diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 8bdbdfaa8c9..f0f71b4874e 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -320,8 +320,9 @@ namespace ts { * @param fileName The path to the config file */ export function readConfigFile(fileName: string): { config?: any; error?: Diagnostic } { + let text = ''; try { - let text = sys.readFile(fileName); + text = sys.readFile(fileName); } catch (e) { return { error: createCompilerDiagnostic(Diagnostics.Cannot_read_file_0_Colon_1, fileName, e.message) }; diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index e71d3aea41b..b9d7f664f80 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3783,7 +3783,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { emitDefaultValueAssignments(ctor); emitRestParameter(ctor); if (baseTypeElement) { - let superCall = findInitialSuperCall(ctor); + var superCall = findInitialSuperCall(ctor); if (superCall) { writeLine(); emit(superCall); diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 8e062c647fa..3144b6a1892 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -5647,8 +5647,9 @@ namespace ts { return; function visitNode(node: IncrementalNode) { + let text = ''; if (aggressiveChecks && shouldCheckNode(node)) { - let text = oldText.substring(node.pos, node.end); + text = oldText.substring(node.pos, node.end); } // Ditch any existing LS children we may have created. This way we can avoid