mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
fix(47561): use parameter name from enclosing declaration (#47609)
This commit is contained in:
@@ -6397,7 +6397,8 @@ namespace ts {
|
||||
includePrivateSymbol?.(sym);
|
||||
}
|
||||
if (isIdentifier(node)) {
|
||||
const name = sym.flags & SymbolFlags.TypeParameter ? typeParameterToName(getDeclaredTypeOfSymbol(sym), context) : factory.cloneNode(node);
|
||||
const type = getDeclaredTypeOfSymbol(sym);
|
||||
const name = sym.flags & SymbolFlags.TypeParameter && !isTypeSymbolAccessible(type.symbol, context.enclosingDeclaration) ? typeParameterToName(type, context) : factory.cloneNode(node);
|
||||
name.symbol = sym; // for quickinfo, which uses identifier symbol information
|
||||
return { introducesError, node: setEmitFlags(setOriginalNode(name, node), EmitFlags.NoAsciiEscaping) };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user