@@ -11,7 +11,6 @@ namespace ts {
1111
1212        invalidateResolutionsOfFailedLookupLocations ( ) : boolean ; 
1313        invalidateResolutionOfFile ( filePath : Path ) : void ; 
14-         removeRelativeNoResolveResolutionsOfFile ( filePath : Path ) : boolean ; 
1514        removeResolutionsOfFile ( filePath : Path ) : void ; 
1615        removeResolutionsFromProjectReferenceRedirects ( filePath : Path ) : void ; 
1716        setFilesWithInvalidatedNonRelativeUnresolvedImports ( filesWithUnresolvedImports : ESMap < Path ,  readonly  string [ ] > ) : void ; 
@@ -142,21 +141,7 @@ namespace ts {
142141    type  GetResolutionWithResolvedFileName < T  extends  ResolutionWithFailedLookupLocations  =  ResolutionWithFailedLookupLocations ,  R  extends  ResolutionWithResolvedFileName  =  ResolutionWithResolvedFileName >  = 
143142        ( resolution : T )  =>  R  |  undefined ; 
144143
145-     export  enum  ResolutionKind  { 
146-         All , 
147-         RelativeReferencesInOpenFileOnly 
148-     } 
149- 
150-     const  noResolveResolvedModule : ResolvedModuleWithFailedLookupLocations  =  { 
151-         resolvedModule : undefined , 
152-         failedLookupLocations : [ ] 
153-     } ; 
154-     const  noResolveResolvedTypeReferenceDirective : ResolvedTypeReferenceDirectiveWithFailedLookupLocations  =  { 
155-         resolvedTypeReferenceDirective : undefined , 
156-         failedLookupLocations : [ ] 
157-     } ; 
158- 
159-     export  function  createResolutionCache ( resolutionHost : ResolutionCacheHost ,  rootDirForResolution : string  |  undefined ,  resolutionKind : ResolutionKind ,  logChangesWhenResolvingModule : boolean ) : ResolutionCache  { 
144+     export  function  createResolutionCache ( resolutionHost : ResolutionCacheHost ,  rootDirForResolution : string  |  undefined ,  logChangesWhenResolvingModule : boolean ) : ResolutionCache  { 
160145        let  filesWithChangedSetOfUnresolvedImports : Path [ ]  |  undefined ; 
161146        let  filesWithInvalidatedResolutions : Set < Path >  |  undefined ; 
162147        let  filesWithInvalidatedNonRelativeUnresolvedImports : ReadonlyESMap < Path ,  readonly  string [ ] >  |  undefined ; 
@@ -221,7 +206,6 @@ namespace ts {
221206            hasChangedAutomaticTypeDirectiveNames : ( )  =>  hasChangedAutomaticTypeDirectiveNames , 
222207            invalidateResolutionOfFile, 
223208            invalidateResolutionsOfFailedLookupLocations, 
224-             removeRelativeNoResolveResolutionsOfFile, 
225209            setFilesWithInvalidatedNonRelativeUnresolvedImports, 
226210            createHasInvalidatedResolution, 
227211            updateTypeRootsWatch, 
@@ -357,12 +341,11 @@ namespace ts {
357341            shouldRetryResolution : ( t : T )  =>  boolean ; 
358342            reusedNames ?: readonly  string [ ] ; 
359343            logChanges ?: boolean ; 
360-             noResolveResolution : T ; 
361344        } 
362345        function  resolveNamesWithLocalCache < T  extends  ResolutionWithFailedLookupLocations ,  R  extends  ResolutionWithResolvedFileName > ( { 
363346            names,  containingFile,  redirectedReference, 
364347            cache,  perDirectoryCacheWithRedirects, 
365-             loader,  getResolutionWithResolvedFileName,  noResolveResolution , 
348+             loader,  getResolutionWithResolvedFileName, 
366349            shouldRetryResolution,  reusedNames,  logChanges
367350        } : ResolveNamesWithLocalCacheInput < T ,  R > ) : ( R  |  undefined ) [ ]  { 
368351            const  path  =  resolutionHost . toPath ( containingFile ) ; 
@@ -399,10 +382,7 @@ namespace ts {
399382                        resolution  =  resolutionInDirectory ; 
400383                    } 
401384                    else  { 
402-                         resolution  =  resolutionKind  ===  ResolutionKind . All  || 
403-                             ( isExternalModuleNameRelative ( name )  &&  resolutionHost . fileIsOpen ( path ) )  ?
404-                             loader ( name ,  containingFile ,  compilerOptions ,  resolutionHost . getCompilerHost ?.( )  ||  resolutionHost ,  redirectedReference )  :
405-                             noResolveResolution ; 
385+                         resolution  =  loader ( name ,  containingFile ,  compilerOptions ,  resolutionHost . getCompilerHost ?.( )  ||  resolutionHost ,  redirectedReference ) ; 
406386                        perDirectoryResolution . set ( name ,  resolution ) ; 
407387                    } 
408388                    resolutionsInFile . set ( name ,  resolution ) ; 
@@ -461,7 +441,6 @@ namespace ts {
461441                loader : resolveTypeReferenceDirective , 
462442                getResolutionWithResolvedFileName : getResolvedTypeReferenceDirective , 
463443                shouldRetryResolution : resolution  =>  resolution . resolvedTypeReferenceDirective  ===  undefined , 
464-                 noResolveResolution : noResolveResolvedTypeReferenceDirective , 
465444            } ) ; 
466445        } 
467446
@@ -477,7 +456,6 @@ namespace ts {
477456                shouldRetryResolution : resolution  =>  ! resolution . resolvedModule  ||  ! resolutionExtensionIsTSOrJson ( resolution . resolvedModule . extension ) , 
478457                reusedNames, 
479458                logChanges : logChangesWhenResolvingModule , 
480-                 noResolveResolution : noResolveResolvedModule , 
481459            } ) ; 
482460        } 
483461
@@ -763,31 +741,6 @@ namespace ts {
763741            } 
764742        } 
765743
766-         function  removeRelativeNoResolveResolutionsOfFileFromCache < T  extends  ResolutionWithFailedLookupLocations > ( 
767-             cache : ESMap < Path ,  ESMap < string ,  T > > , 
768-             filePath : Path , 
769-             noResolveResolution : T , 
770-         )  { 
771-             Debug . assert ( resolutionKind  ===  ResolutionKind . RelativeReferencesInOpenFileOnly ) ; 
772-             // Deleted file, stop watching failed lookups for all the resolutions in the file 
773-             const  resolutions  =  cache . get ( filePath ) ; 
774-             if  ( ! resolutions )  return  false ; 
775-             let  invalidated  =  false ; 
776-             resolutions . forEach ( ( resolution ,  name )  =>  { 
777-                 if  ( resolution  ===  noResolveResolution  &&  isExternalModuleNameRelative ( name ) )  { 
778-                     resolutions . delete ( name ) ; 
779-                     invalidated  =  true ; 
780-                 } 
781-             } ) ; 
782-             return  invalidated ; 
783-         } 
784- 
785-         function  removeRelativeNoResolveResolutionsOfFile ( filePath : Path )  { 
786-             let  invalidated  =  removeRelativeNoResolveResolutionsOfFileFromCache ( resolvedModuleNames ,  filePath ,  noResolveResolvedModule ) ; 
787-             invalidated  =  removeRelativeNoResolveResolutionsOfFileFromCache ( resolvedTypeReferenceDirectives ,  filePath ,  noResolveResolvedTypeReferenceDirective )  ||  invalidated ; 
788-             return  invalidated ; 
789-         } 
790- 
791744        function  setFilesWithInvalidatedNonRelativeUnresolvedImports ( filesMap : ReadonlyESMap < Path ,  readonly  string [ ] > )  { 
792745            Debug . assert ( filesWithInvalidatedNonRelativeUnresolvedImports  ===  filesMap  ||  filesWithInvalidatedNonRelativeUnresolvedImports  ===  undefined ) ; 
793746            filesWithInvalidatedNonRelativeUnresolvedImports  =  filesMap ; 
0 commit comments