Skip to content

Commit 151497f

Browse files
committed
Move field copying to a better place I guess
1 parent 8ca12a6 commit 151497f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/compiler/program.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,7 @@ namespace ts {
15771577
newSourceFile.originalFileName = oldSourceFile.originalFileName;
15781578
newSourceFile.resolvedPath = oldSourceFile.resolvedPath;
15791579
newSourceFile.fileName = oldSourceFile.fileName;
1580+
newSourceFile.impliedNodeFormat = oldSourceFile.impliedNodeFormat;
15801581

15811582
const packageName = oldProgram.sourceFileToPackageName.get(oldSourceFile.path);
15821583
if (packageName !== undefined) {

src/services/services.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,9 +1124,7 @@ namespace ts {
11241124
}
11251125

11261126
// Otherwise, just create a new source file.
1127-
const newSourceFile = createLanguageServiceSourceFile(sourceFile.fileName, scriptSnapshot, sourceFile.languageVersion, version, /*setNodeParents*/ true, sourceFile.scriptKind);
1128-
newSourceFile.impliedNodeFormat = sourceFile.impliedNodeFormat;
1129-
return newSourceFile;
1127+
return createLanguageServiceSourceFile(sourceFile.fileName, scriptSnapshot, sourceFile.languageVersion, version, /*setNodeParents*/ true, sourceFile.scriptKind);
11301128
}
11311129

11321130
const NoopCancellationToken: CancellationToken = {

0 commit comments

Comments
 (0)