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

Method getOpenedFile

compiler/companion/src/Workspace.ts:206–213  ·  view source on GitHub ↗
(fileName: string)

Source from the content-addressed store, hash-verified

204 }
205
206 getOpenedFile(fileName: string): OpenedFile {
207 const sourceFile = this.project.getOpenedSourceFile(fileName);
208 if (sourceFile) {
209 return { workspaceProject: this.project, sourceFile };
210 }
211
212 throw new Error(`File '${fileName}' is not loaded`);
213 }
214
215 registerInMemoryFile(fileName: string, fileContent: string): void {
216 const resolvedPath = this.project.resolvePath(fileName);

Callers 7

doEmitFileMethod · 0.95
getDiagnosticsSyncMethod · 0.95
getInterfaceASTMethod · 0.95
getFunctionASTMethod · 0.95
getEnumASTMethod · 0.95
compileFileFunction · 0.80

Calls 1

getOpenedSourceFileMethod · 0.80

Tested by

no test coverage detected