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

Function readBuilderProgram

test/fixtures/snapshot/typescript.js:123281–123296  ·  view source on GitHub ↗
(compilerOptions, host)

Source from the content-addressed store, hash-verified

123279var ts;
123280(function (ts) {
123281 function readBuilderProgram(compilerOptions, host) {
123282 if (ts.outFile(compilerOptions))
123283 return undefined;
123284 var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions);
123285 if (!buildInfoPath)
123286 return undefined;
123287 var content = host.readFile(buildInfoPath);
123288 if (!content)
123289 return undefined;
123290 var buildInfo = ts.getBuildInfo(content);
123291 if (buildInfo.version !== ts.version)
123292 return undefined;
123293 if (!buildInfo.program)
123294 return undefined;
123295 return ts.createBuildProgramUsingProgramBuildInfo(buildInfo.program, buildInfoPath, host);
123296 }
123297 ts.readBuilderProgram = readBuilderProgram;
123298 function createIncrementalCompilerHost(options, system) {
123299 if (system === void 0) { system = ts.sys; }

Callers 2

createIncrementalProgramFunction · 0.85
createWatchProgramFunction · 0.85

Calls 1

readFileMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…