Skip to content

Commit

Permalink
getSymbolDisplayPartsDocumentationAndSymbolKind: use actual `symbol…
Browse files Browse the repository at this point in the history
….flags` for `getAliasedSymbol`

Fixes microsoft#35347.
  • Loading branch information
elibarzilay committed Jun 4, 2020
1 parent aceb8d6 commit 80f3298
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/symbolDisplay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
24 changes: 24 additions & 0 deletions tests/cases/fourslash/quickInfoJSExport.ts
Original file line number Diff line number Diff line change
@@ -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`);

0 comments on commit 80f3298

Please sign in to comment.