mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
getExternalModuleMember:always resolve alias of moduleSymbol (#43718)
Previously, getExternalModuleMember passed through its received value of `dontResolveAlias` to every function that accepted it. That includes (1) resolution of the module symbol and (2) resolution of the module specifier. However, in TS, the module symbol is never an alias anyway, so dontResolveAlias doesn't make a difference. In JS, the module symbol *can* be an alias, and it should always be resolved. That's what this PR does. Fixes #43713
This commit is contained in:
committed by
GitHub
parent
d16790e3cc
commit
c9eb62fafb
@@ -2742,7 +2742,7 @@ namespace ts {
|
||||
return undefined;
|
||||
}
|
||||
const suppressInteropError = name.escapedText === InternalSymbolName.Default && !!(compilerOptions.allowSyntheticDefaultImports || compilerOptions.esModuleInterop);
|
||||
const targetSymbol = resolveESModuleSymbol(moduleSymbol, moduleSpecifier, dontResolveAlias, suppressInteropError);
|
||||
const targetSymbol = resolveESModuleSymbol(moduleSymbol, moduleSpecifier, /*dontResolveAlias*/ false, suppressInteropError);
|
||||
if (targetSymbol) {
|
||||
if (name.escapedText) {
|
||||
if (isShorthandAmbientModuleSymbol(moduleSymbol)) {
|
||||
|
||||
Reference in New Issue
Block a user