MCPcopy Create free account
hub / github.com/Snapchat/Valdi / doUpdateSourceFileNode

Method doUpdateSourceFileNode

compiler/companion/src/JSXProcessor.ts:1236–1252  ·  view source on GitHub ↗
(
    node: ts.SourceFile,
    newStatements: ts.Statement[],
    transformContext: ts.TransformationContext,
  )

Source from the content-addressed store, hash-verified

1234 }
1235
1236 private doUpdateSourceFileNode(
1237 node: ts.SourceFile,
1238 newStatements: ts.Statement[],
1239 transformContext: ts.TransformationContext,
1240 ): ts.SourceFile {
1241 const newNode = transformContext.factory.updateSourceFile(
1242 node,
1243 newStatements,
1244 undefined,
1245 undefined,
1246 undefined,
1247 undefined,
1248 undefined,
1249 );
1250 ts.addEmitHelpers(newNode, transformContext.readEmitHelpers());
1251 return newNode;
1252 }
1253
1254 private transformSourceFile(
1255 node: ts.SourceFile,

Callers 2

injectDeclarationsMethod · 0.95
transformSourceFileMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected