From c7b2d9228a34d5162dc8af1d1c99d7086fd393d8 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 30 Apr 2018 11:52:49 -0700 Subject: [PATCH] PR feedback --- src/compiler/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index ed9f5307207..b84c8ca004f 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -702,7 +702,6 @@ namespace ts { initializeState(sourceText, languageVersion, syntaxCursor, ScriptKind.JSON); // Set source file so that errors will be reported with this file name sourceFile = createSourceFile(fileName, ScriptTarget.ES2015, ScriptKind.JSON, /*isDeclaration*/ false); - const result = sourceFile as JsonSourceFile; // Prime the scanner. nextToken(); @@ -751,6 +750,7 @@ namespace ts { } sourceFile.parseDiagnostics = parseDiagnostics; + const result = sourceFile as JsonSourceFile; clearState(); return result; }