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

Function makeChange

test/fixtures/snapshot/typescript.js:150264–150269  ·  view source on GitHub ↗
(changeTracker, sourceFile, assertion)

Source from the content-addressed store, hash-verified

150262 }); },
150263 });
150264 function makeChange(changeTracker, sourceFile, assertion) {
150265 var replacement = ts.isAsExpression(assertion)
150266 ? ts.factory.createAsExpression(assertion.expression, ts.factory.createKeywordTypeNode(155 /* SyntaxKind.UnknownKeyword */))
150267 : ts.factory.createTypeAssertion(ts.factory.createKeywordTypeNode(155 /* SyntaxKind.UnknownKeyword */), assertion.expression);
150268 changeTracker.replaceNode(sourceFile, assertion.expression, replacement);
150269 }
150270 function getAssertion(sourceFile, pos) {
150271 if (ts.isInJSFile(sourceFile))
150272 return undefined;

Callers 4

typescript.jsFile · 0.85
getFixFunction · 0.85
getDeclarationSiteFixFunction · 0.85
getUseSiteFixFunction · 0.85

Calls 15

applyChangeFunction · 0.85
everyMethod · 0.80
assertMethod · 0.80
someMethod · 0.80
hasMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected