mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Limit when we allow nested unique symbols to be serialized to when their declaration is within the same file as the context
This commit is contained in:
@@ -5812,7 +5812,7 @@ namespace ts {
|
||||
}
|
||||
const oldFlags = context.flags;
|
||||
if (type.flags & TypeFlags.UniqueESSymbol &&
|
||||
type.symbol === symbol) {
|
||||
type.symbol === symbol && (!context.enclosingDeclaration || some(symbol.declarations, d => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration!)))) {
|
||||
context.flags |= NodeBuilderFlags.AllowUniqueESSymbolType;
|
||||
}
|
||||
const result = typeToTypeNodeHelper(type, context);
|
||||
|
||||
Reference in New Issue
Block a user