MCPcopy Index your code
hub / github.com/nodejs/node / addJSDocComment

Function addJSDocComment

test/fixtures/snapshot/typescript.js:31711–31721  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

31709 }
31710 var hasDeprecatedTag = false;
31711 function addJSDocComment(node) {
31712 ts.Debug.assert(!node.jsDoc); // Should only be called once per node
31713 var jsDoc = ts.mapDefined(ts.getJSDocCommentRanges(node, sourceText), function (comment) { return JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos); });
31714 if (jsDoc.length)
31715 node.jsDoc = jsDoc;
31716 if (hasDeprecatedTag) {
31717 hasDeprecatedTag = false;
31718 node.flags |= 268435456 /* NodeFlags.Deprecated */;
31719 }
31720 return node;
31721 }
31722 function reparseTopLevelAwait(sourceFile) {
31723 var savedSyntaxCursor = syntaxCursor;
31724 var baseSyntaxCursor = IncrementalParser.createSyntaxCursor(sourceFile);

Callers 3

parseSourceFileWorkerFunction · 0.85
withJSDocFunction · 0.85

Calls 1

assertMethod · 0.80

Tested by

no test coverage detected