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

Function appendIfCommentDirective

test/fixtures/snapshot/typescript.js:11969–11978  ·  view source on GitHub ↗
(commentDirectives, text, commentDirectiveRegEx, lineStart)

Source from the content-addressed store, hash-verified

11967 return token;
11968 }
11969 function appendIfCommentDirective(commentDirectives, text, commentDirectiveRegEx, lineStart) {
11970 var type = getDirectiveFromComment(ts.trimStringStart(text), commentDirectiveRegEx);
11971 if (type === undefined) {
11972 return commentDirectives;
11973 }
11974 return ts.append(commentDirectives, {
11975 range: { pos: lineStart, end: pos },
11976 type: type,
11977 });
11978 }
11979 function getDirectiveFromComment(text, commentDirectiveRegEx) {
11980 var match = commentDirectiveRegEx.exec(text);
11981 if (!match) {

Callers 1

scanFunction · 0.85

Calls 2

getDirectiveFromCommentFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…