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

Method createSourceFile

compiler/companion/src/project/Project.ts:67–70  ·  view source on GitHub ↗
(path: string, content: string)

Source from the content-addressed store, hash-verified

65 }
66
67 createSourceFile(path: string, content: string): ts.SourceFile {
68 this.setFileContentAtPath(path, content);
69 return this.openSourceFile(path);
70 }
71
72 openSourceFile(path: string): ts.SourceFile {
73 return this.sourceFileManager.getOrCreateSourceFile(path, this.compilerOptions.target ?? ts.ScriptTarget.Latest);

Callers 12

compileFunction · 0.95
compileFunction · 0.95
generatePositionsFunction · 0.45
rewriteTopLevelAwaitFunction · 0.45
wrapObjectLiteralFunction · 0.45
completionsMethod · 0.45
replaceReturnValueMethod · 0.45
templateFunctionStrFunction · 0.45
constructorMethod · 0.45
Project.spec.tsFile · 0.45
parseFileFunction · 0.45

Calls 2

setFileContentAtPathMethod · 0.95
openSourceFileMethod · 0.95

Tested by 2

compileFunction · 0.76
compileFunction · 0.76