mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-10 18:04:18 -05:00
Fix crash when looking for __esModule during symbol table merging (#52554)
This commit is contained in:
@@ -3884,7 +3884,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
|
||||
function resolveExportByName(moduleSymbol: Symbol, name: __String, sourceNode: TypeOnlyCompatibleAliasDeclaration | undefined, dontResolveAlias: boolean) {
|
||||
const exportValue = moduleSymbol.exports!.get(InternalSymbolName.ExportEquals);
|
||||
const exportSymbol = exportValue ? getPropertyOfType(getTypeOfSymbol(exportValue), name) : moduleSymbol.exports!.get(name);
|
||||
const exportSymbol = exportValue
|
||||
? getPropertyOfType(getTypeOfSymbol(exportValue), name, /*skipObjectFunctionPropertyAugment*/ true)
|
||||
: moduleSymbol.exports!.get(name);
|
||||
const resolved = resolveSymbol(exportSymbol, dontResolveAlias);
|
||||
markSymbolOfAliasDeclarationIfTypeOnly(sourceNode, exportSymbol, resolved, /*overwriteEmpty*/ false);
|
||||
return resolved;
|
||||
|
||||
Reference in New Issue
Block a user