mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-11 02:15:10 -05:00
Fix declaration emit for JS default re-exports that resolve to modules through synthesized default exports (#56340)
This commit is contained in:
@@ -9744,6 +9744,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
// does not use localName because the symbol name in this case refers to the name in the exports table,
|
||||
// which we must exactly preserve
|
||||
const specifier = (node.parent.parent as ExportDeclaration).moduleSpecifier;
|
||||
if (specifier && (node as ExportSpecifier).propertyName?.escapedText === InternalSymbolName.Default) {
|
||||
verbatimTargetName = InternalSymbolName.Default;
|
||||
}
|
||||
// targetName is only used when the target is local, as otherwise the target is an alias that points at
|
||||
// another file
|
||||
serializeExportSpecifier(
|
||||
|
||||
Reference in New Issue
Block a user