Retarget to es6 and fix the resulting bugs (#32221)

* Retarget to es6 and fix the resulting bugs

* Set target back to es5

* Fix typos in declaration emitter
This commit is contained in:
Wesley Wigham
2019-08-01 14:23:57 -07:00
committed by GitHub
parent 33f362abaf
commit 00a75c4283
4 changed files with 28 additions and 9 deletions

View File

@@ -814,7 +814,10 @@ namespace ts {
let mapFromFileToProjectReferenceRedirects: Map<Path> | undefined;
const shouldCreateNewSourceFile = shouldProgramCreateNewSourceFiles(oldProgram, options);
const structuralIsReused = tryReuseStructureFromOldProgram();
// We set `structuralIsReused` to `undefined` because `tryReuseStructureFromOldProgram` calls `tryReuseStructureFromOldProgram` which checks
// `structuralIsReused`, which would be a TDZ violation if it was not set in advance to `undefined`.
let structuralIsReused: StructureIsReused | undefined;
structuralIsReused = tryReuseStructureFromOldProgram();
if (structuralIsReused !== StructureIsReused.Completely) {
processingDefaultLibFiles = [];
processingOtherFiles = [];