refactor(compiler): remove TypeScript 4.0 program reuse check (#41406)
We no longer support TS 4.0, hence this check is redundant. PR Close #41406
This commit is contained in:
parent
64b979e12b
commit
dc655262be
|
@ -668,10 +668,7 @@ class AngularCompilerProgram implements Program {
|
|||
// - we cache all the files in the hostAdapter
|
||||
// - new new stubs use the exactly same imports/exports as the old once (we assert that in
|
||||
// hostAdapter.updateGeneratedFile).
|
||||
// TS 4.1+ stores the reuse state in the new program
|
||||
const checkReuseProgram =
|
||||
(ts.versionMajorMinor as string) === '4.0' ? tmpProgram : this._tsProgram;
|
||||
if (tsStructureIsReused(checkReuseProgram) !== StructureIsReused.Completely) {
|
||||
if (tsStructureIsReused(this._tsProgram) !== StructureIsReused.Completely) {
|
||||
throw new Error(`Internal Error: The structure of the program changed during codegen.`);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue