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

Method constructor

compiler/companion/src/project/Project.ts:42–54  ·  view source on GitHub ↗
(readonly rootPath: string, compilerOptions?: ts.CompilerOptions, readonly listener?: IProjectListener)

Source from the content-addressed store, hash-verified

40 private updatingProgram = false;
41
42 constructor(readonly rootPath: string, compilerOptions?: ts.CompilerOptions, readonly listener?: IProjectListener) {
43 this.fileManager = new FileManager(rootPath, this);
44 this.sourceFileManager = new SourceFileManager(this.fileManager, this);
45
46 this.resolvedCompilerOptions = compilerOptions;
47
48 // Populate TSLibs
49 const database = TSLibsDatabase.get();
50 for (const entry of database.entries) {
51 const resolvedPath = this.fileManager.resolvePath(path.join(TS_LIBS_VIRTUAL_DIRECTORY, entry.fileName));
52 this.fileManager.addFileInMemory(resolvedPath, entry.content);
53 }
54 }
55
56 destroy(): void {
57 this.fileManager.clear();

Callers

nothing calls this directly

Calls 4

addFileInMemoryMethod · 0.80
getMethod · 0.65
resolvePathMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected