File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -268,6 +268,7 @@ export class ExportAnalyzer {
268268 : undefined ;
269269
270270 const resolvedModule : ts . ResolvedModuleFull | undefined = TypeScriptInternals . getResolvedModule (
271+ this . _program ,
271272 importOrExportDeclaration . getSourceFile ( ) ,
272273 moduleSpecifier ,
273274 mode
@@ -882,6 +883,7 @@ export class ExportAnalyzer {
882883 )
883884 : undefined ;
884885 const resolvedModule : ts . ResolvedModuleFull | undefined = TypeScriptInternals . getResolvedModule (
886+ this . _program ,
885887 importOrExportDeclaration . getSourceFile ( ) ,
886888 moduleSpecifier ,
887889 mode
Original file line number Diff line number Diff line change @@ -82,14 +82,19 @@ export class TypeScriptInternals {
8282 * The compiler populates this cache as part of analyzing the source file.
8383 */
8484 public static getResolvedModule (
85+ program : ts . Program ,
8586 sourceFile : ts . SourceFile ,
8687 moduleNameText : string ,
8788 mode : ts . ModuleKind . CommonJS | ts . ModuleKind . ESNext | undefined
8889 ) : ts . ResolvedModuleFull | undefined {
8990 // Compiler internal:
90- // https://github.com/microsoft/TypeScript/blob/v4.7.2/src/compiler/utilities.ts#L161
91-
92- return ( ts as any ) . getResolvedModule ( sourceFile , moduleNameText , mode ) ;
91+ // https://github.com/microsoft/TypeScript/blob/v5.3-beta/src/compiler/types.ts#L4678
92+ const result : ts . ResolvedModuleWithFailedLookupLocations | undefined = ( program as any ) . getResolvedModule (
93+ sourceFile ,
94+ moduleNameText ,
95+ mode
96+ ) ;
97+ return result ?. resolvedModule ;
9398 }
9499
95100 /**
You can’t perform that action at this time.
0 commit comments