File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -99,15 +99,20 @@ export function createResolverFunctions(kwargs: {
9999 containingSourceFile ?: TSCommon . SourceFile
100100 ) : ( TSCommon . ResolvedModule | undefined ) [ ] => {
101101 return moduleNames . map ( ( moduleName , i ) => {
102- const mode = containingSourceFile ? ( ts as any as TSInternal ) . getModeForResolutionAtIndex ?.( containingSourceFile , i ) : undefined ;
102+ const mode = containingSourceFile
103+ ? ( ts as any as TSInternal ) . getModeForResolutionAtIndex ?.(
104+ containingSourceFile ,
105+ i
106+ )
107+ : undefined ;
103108 const { resolvedModule } = ts . resolveModuleName (
104109 moduleName ,
105110 containingFile ,
106111 config . options ,
107112 host ,
108113 moduleResolutionCache ,
109114 redirectedReference ,
110- mode ,
115+ mode
111116 ) ;
112117 if ( resolvedModule ) {
113118 fixupResolvedModule ( resolvedModule ) ;
Original file line number Diff line number Diff line change @@ -118,7 +118,10 @@ export interface TSInternal {
118118 usage : 'files' | 'directories' | 'exclude'
119119 ) : string | undefined ;
120120 // Added in TS 4.7
121- getModeForResolutionAtIndex ?( file : TSInternal . SourceFileImportsList , index : number ) : _ts . SourceFile [ 'impliedNodeFormat' ] ;
121+ getModeForResolutionAtIndex ?(
122+ file : TSInternal . SourceFileImportsList ,
123+ index : number
124+ ) : _ts . SourceFile [ 'impliedNodeFormat' ] ;
122125}
123126/** @internal */
124127export namespace TSInternal {
@@ -131,6 +134,6 @@ export namespace TSInternal {
131134 }
132135 // Note: is only a partial declaration, TS sources declare other fields
133136 export interface SourceFileImportsList {
134- impliedNodeFormat ?: TSCommon . SourceFile [ " impliedNodeFormat" ] ;
135- } ;
137+ impliedNodeFormat ?: TSCommon . SourceFile [ ' impliedNodeFormat' ] ;
138+ }
136139}
You can’t perform that action at this time.
0 commit comments