getSymbolDisplayPartsDocumentationAndSymbolKind: use actual symbol.flags for getAliasedSymbol

Fixes #35347.
This commit is contained in:
Eli Barzilay
2020-06-04 02:00:28 -04:00
parent 55d4592f4e
commit a4c14a2cdc
2 changed files with 26 additions and 1 deletions

View File

@@ -379,7 +379,8 @@ namespace ts.SymbolDisplay {
}
}
}
if (symbolFlags & SymbolFlags.Alias) {
// don't use symbolFlags since getAliasedSymbol requires the flag on the symbol itself
if (symbol.flags & SymbolFlags.Alias) {
prefixNextMeaning();
if (!hasAddedSymbolInfo) {
const resolvedSymbol = typeChecker.getAliasedSymbol(symbol);

View File

@@ -0,0 +1,24 @@
/// <reference path="fourslash.ts" />
// GH #35347
// @Filename: a.js
// @allowJs: true
//// /**
//// * @enum {string}
//// */
//// const testString = {
//// one: "1",
//// two: "2"
//// };
////
//// export { test/**/String };
verify.quickInfoAt("",
`type testString = string
(alias) type testString = any
(alias) const testString: {
one: string;
two: string;
}
export testString`);