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

    Function iterateTokens

    • Iterates over all tokens of node

      Parameters

      • node: Node

        The node whose tokens should be visited

      • sourceFile: SourceFile = ...

      Returns Generator<Node>

      declare const node: ts.Node;

      for (const token of iterateTokens(token)) {
      console.log("Found token:", token.getText());
      });