Skip to content

Commit

Permalink
Make sure impliedNodeFormat is set for the sourceFile
Browse files Browse the repository at this point in the history
  • Loading branch information
sheetalkamat committed Sep 28, 2022
1 parent 5c98b9c commit 651a47f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/compiler/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1734,6 +1734,7 @@ namespace ts {
if (!newSourceFile) {
return StructureIsReused.Not;
}
newSourceFile.impliedNodeFormat = sourceFileOptions.impliedNodeFormat;
newSourceFile.packageJsonLocations = sourceFileOptions.packageJsonLocations?.length ? sourceFileOptions.packageJsonLocations : undefined;
newSourceFile.packageJsonScope = sourceFileOptions.packageJsonScope;

Expand Down Expand Up @@ -2968,6 +2969,7 @@ namespace ts {
file.path = path;
file.resolvedPath = toPath(fileName);
file.originalFileName = originalFileName;
file.impliedNodeFormat = sourceFileOptions.impliedNodeFormat;
file.packageJsonLocations = sourceFileOptions.packageJsonLocations?.length ? sourceFileOptions.packageJsonLocations : undefined;
file.packageJsonScope = sourceFileOptions.packageJsonScope;
addFileIncludeReason(file, reason);
Expand Down

0 comments on commit 651a47f

Please sign in to comment.