Offer auto-imports from wildcard exports with AutoImportProvider (#54831)

This commit is contained in:
Andrew Branch
2023-07-07 12:50:38 -05:00
committed by GitHub
parent e374eba37c
commit 22a9ae9eed
5 changed files with 172 additions and 36 deletions

View File

@@ -862,7 +862,7 @@ function tryGetModuleNameFromExports(options: CompilerOptions, targetFilePath: s
for (const key of getOwnKeys(exports as MapLike<unknown>)) {
if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) {
const subTarget = (exports as MapLike<unknown>)[key];
const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions);
const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode);
if (result) {
return result;
}