Skip to content

Commit 881884a

Browse files
committed
Revert more unneeded changes
1 parent 51408f0 commit 881884a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/compiler/core.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2006,8 +2006,6 @@ namespace ts {
20062006
return ScriptKind.TS;
20072007
case ".tsx":
20082008
return ScriptKind.TSX;
2009-
case ".vue":
2010-
return ScriptKind.External;
20112009
default:
20122010
return ScriptKind.Unknown;
20132011
}

src/compiler/parser.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,7 @@ namespace ts {
687687
return sourceFile;
688688
}
689689

690+
690691
function addJSDocComment<T extends Node>(node: T): T {
691692
const comments = getJSDocCommentRanges(node, sourceFile.text);
692693
if (comments) {
@@ -741,7 +742,7 @@ namespace ts {
741742
function createSourceFile(fileName: string, languageVersion: ScriptTarget, scriptKind: ScriptKind): SourceFile {
742743
// code from createNode is inlined here so createNode won't have to deal with special case of creating source files
743744
// this is quite rare comparing to other nodes and createNode should be as fast as possible
744-
const sourceFile = <SourceFile>new SourceFileConstructor(SyntaxKind.SourceFile, /*pos*/ 0, /*end*/ sourceText.length);
745+
const sourceFile = <SourceFile>new SourceFileConstructor(SyntaxKind.SourceFile, /*pos*/ 0, /* end */ sourceText.length);
745746
nodeCount++;
746747

747748
sourceFile.text = sourceText;
@@ -6978,7 +6979,8 @@ namespace ts {
69786979
// inconsistent tree. Setting the parents on the new tree should be very fast. We
69796980
// will immediately bail out of walking any subtrees when we can see that their parents
69806981
// are already correct.
6981-
return Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, /*setParentNodes*/ true, sourceFile.scriptKind);
6982+
const result = Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, /*setParentNodes*/ true, sourceFile.scriptKind);
6983+
return result;
69826984
}
69836985

69846986
function moveElementEntirelyPastChangeRange(element: IncrementalElement, isArray: boolean, delta: number, oldText: string, newText: string, aggressiveChecks: boolean) {

0 commit comments

Comments
 (0)