Function forEachComment

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

    Parameters

    Returns void

    Example

    declare const node: ts.Node;

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