Make isEntityNameVisible duplicate the node builder logic to always consider type parameters as visible if they are the resolution result (#38921)

This commit is contained in:
Wesley Wigham
2020-06-09 13:40:17 -07:00
committed by GitHub
parent a72ed0a2f5
commit f41398e100
5 changed files with 79 additions and 0 deletions

View File

@@ -4064,6 +4064,9 @@ namespace ts {
const firstIdentifier = getFirstIdentifier(entityName);
const symbol = resolveName(enclosingDeclaration, firstIdentifier.escapedText, meaning, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false);
if (symbol && symbol.flags & SymbolFlags.TypeParameter && meaning & SymbolFlags.Type) {
return { accessibility: SymbolAccessibility.Accessible };
}
// Verify if the symbol is accessible
return (symbol && hasVisibleDeclarations(symbol, /*shouldComputeAliasToMakeVisible*/ true)) || {