Skip to content

Commit 3921c66

Browse files
committed
sourceFileToPackageName to keyed with Path
1 parent 44069e7 commit 3921c66

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/compiler/program.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ namespace ts {
913913
// `packageIdToSourceFile` is only used while building the program, while `sourceFileToPackageName` and `isSourceFileTargetOfRedirect` are kept around.
914914
let packageIdToSourceFile = new Map<string, SourceFile>();
915915
// Maps from a SourceFile's `.path` to the name of the package it was imported with.
916-
let sourceFileToPackageName = new Map<string, string>();
916+
let sourceFileToPackageName = new Map<Path, string>();
917917
// Key is a file name. Value is the (non-empty, or undefined) list of files that redirect to it.
918918
let redirectTargetsMap = createMultiMap<Path, string>();
919919

src/compiler/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3861,7 +3861,7 @@ namespace ts {
38613861
/* @internal */ getLibFileFromReference(ref: FileReference): SourceFile | undefined;
38623862

38633863
/** Given a source file, get the name of the package it was imported from. */
3864-
/* @internal */ sourceFileToPackageName: ESMap<string, string>;
3864+
/* @internal */ sourceFileToPackageName: ESMap<Path, string>;
38653865
/** Set of all source files that some other source file redirects to. */
38663866
/* @internal */ redirectTargetsMap: MultiMap<Path, string>;
38673867
/** Is the file emitted file */
@@ -3956,7 +3956,7 @@ namespace ts {
39563956
getFileProcessingDiagnostics(): readonly ReusableFilePreprocessingDiagnostics[] | undefined;
39573957

39583958
redirectTargetsMap: MultiMap<Path, string>;
3959-
sourceFileToPackageName: ESMap<string, string>;
3959+
sourceFileToPackageName: ESMap<Path, string>;
39603960
structureIsReused?: StructureIsReused;
39613961
}
39623962

0 commit comments

Comments
 (0)