ts-api-utils - v3.0.0-rc.1
    Preparing search index...

    Function forEachToken

    • Iterates over all tokens of node

      Parameters

      • node: Node

        The node whose tokens should be visited

      • callback: ForEachTokenCallback

        Is called for every token contained in node

      • sourceFile: SourceFile = ...

      Returns void

      declare const node: ts.Node;

      forEachToken(node, (token) => {
      console.log("Found token:", token.getText());
      });