Iterates over all comments owned by node or its children.
node
declare const node: ts.Node;forEachComment(node, (fullText, comment) => { console.log(`Found comment at position ${comment.pos}: '${fullText}'.`);}); Copy
declare const node: ts.Node;forEachComment(node, (fullText, comment) => { console.log(`Found comment at position ${comment.pos}: '${fullText}'.`);});
Iterates over all comments owned by
node
or its children.