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

    Function forEachComment

    • Iterates over all comments owned by node or its children.

      Parameters

      Returns void

      declare const node: ts.Node;

      forEachComment(node, (fullText, comment) => {
      console.log(`Found comment at position ${comment.pos}: '${fullText}'.`);
      });