@@ -14,8 +14,13 @@ export class Project {
1414 private host : ts . CompilerHost ;
1515 private resolutionCache : ts . ModuleResolutionCache ;
1616
17- constructor ( public tsConfig : string , public config : ts . ParsedCommandLine , public typeTable : TypeTable , public packageLocations : PackageLocationMap ,
17+ constructor (
18+ public tsConfig : string ,
19+ public config : ts . ParsedCommandLine ,
20+ public typeTable : TypeTable ,
21+ public packageEntryPoints : Map < string , string > ,
1822 public virtualSourceRoot : VirtualSourceRoot ) {
23+
1924 this . resolveModuleNames = this . resolveModuleNames . bind ( this ) ;
2025
2126 this . resolutionCache = ts . createModuleResolutionCache ( pathlib . dirname ( tsConfig ) , ts . sys . realpath , config . options ) ;
@@ -75,7 +80,7 @@ export class Project {
7580 let packageName = packageNameMatch [ 0 ] ;
7681
7782 // Get the overridden location of this package, if one exists.
78- let packageEntryPoint = this . packageLocations . get ( packageName ) ;
83+ let packageEntryPoint = this . packageEntryPoints . get ( packageName ) ;
7984 if ( packageEntryPoint == null ) {
8085 // The package is not overridden, but we have established that it begins with a valid package name.
8186 // Do a lookup in the virtual source root (where dependencies are installed) by changing the 'containing file'.
@@ -116,5 +121,3 @@ export class Project {
116121 return null ;
117122 }
118123}
119-
120- export type PackageLocationMap = Map < string , string > ;
0 commit comments