mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-23 17:30:04 -05:00
Fix export binding of namespaced typedefs (#40980)
The binder incorrectly rejected implicit namespace declarations in typedefs.
This commit is contained in:
committed by
GitHub
parent
4dc7e59248
commit
4283428906
@@ -586,6 +586,9 @@ namespace ts {
|
||||
}
|
||||
|
||||
function jsdocTreatAsExported(node: Node) {
|
||||
if (node.parent && isModuleDeclaration(node)) {
|
||||
node = node.parent;
|
||||
}
|
||||
if (!isJSDocTypeAlias(node)) return false;
|
||||
// jsdoc typedef handling is a bit of a doozy, but to summarize, treat the typedef as exported if:
|
||||
// 1. It has an explicit name (since by default typedefs are always directly exported, either at the top level or in a container), or
|
||||
|
||||
Reference in New Issue
Block a user