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

Function shouldProgramCreateNewSourceFiles

test/fixtures/snapshot/typescript.js:116589–116595  ·  view source on GitHub ↗

* Determine if source file needs to be re-created even if its text hasn't changed

(program, newOptions)

Source from the content-addressed store, hash-verified

116587 * Determine if source file needs to be re-created even if its text hasn't changed
116588 */
116589 function shouldProgramCreateNewSourceFiles(program, newOptions) {
116590 if (!program)
116591 return false;
116592 // If any compiler options change, we can't reuse old source file even if version match
116593 // The change in options like these could result in change in syntax tree or `sourceFile.bindDiagnostics`.
116594 return ts.optionsHaveChanges(program.getCompilerOptions(), newOptions, ts.sourceFileAffectingCompilerOptions);
116595 }
116596 function createCreateProgramOptions(rootNames, options, host, oldProgram, configFileParsingDiagnostics) {
116597 return {
116598 rootNames: rootNames,

Callers 1

createProgramFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…