Skip to content

Commit cd48d81

Browse files
committed
Fix build errors due to naive var->let replacement
1 parent d4403df commit cd48d81

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/compiler/commandLineParser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,9 @@ namespace ts {
320320
* @param fileName The path to the config file
321321
*/
322322
export function readConfigFile(fileName: string): { config?: any; error?: Diagnostic } {
323+
let text = '';
323324
try {
324-
let text = sys.readFile(fileName);
325+
text = sys.readFile(fileName);
325326
}
326327
catch (e) {
327328
return { error: createCompilerDiagnostic(Diagnostics.Cannot_read_file_0_Colon_1, fileName, e.message) };

src/compiler/emitter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3783,7 +3783,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
37833783
emitDefaultValueAssignments(ctor);
37843784
emitRestParameter(ctor);
37853785
if (baseTypeElement) {
3786-
let superCall = findInitialSuperCall(ctor);
3786+
var superCall = findInitialSuperCall(ctor);
37873787
if (superCall) {
37883788
writeLine();
37893789
emit(superCall);

src/compiler/parser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5647,8 +5647,9 @@ namespace ts {
56475647
return;
56485648

56495649
function visitNode(node: IncrementalNode) {
5650+
let text = '';
56505651
if (aggressiveChecks && shouldCheckNode(node)) {
5651-
let text = oldText.substring(node.pos, node.end);
5652+
text = oldText.substring(node.pos, node.end);
56525653
}
56535654

56545655
// Ditch any existing LS children we may have created. This way we can avoid

0 commit comments

Comments
 (0)