Skip to content

Commit a4c14a2

Browse files
committed
getSymbolDisplayPartsDocumentationAndSymbolKind: use actual symbol.flags for getAliasedSymbol
Fixes #35347.
1 parent 55d4592 commit a4c14a2

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

src/services/symbolDisplay.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,8 @@ namespace ts.SymbolDisplay {
379379
}
380380
}
381381
}
382-
if (symbolFlags & SymbolFlags.Alias) {
382+
// don't use symbolFlags since getAliasedSymbol requires the flag on the symbol itself
383+
if (symbol.flags & SymbolFlags.Alias) {
383384
prefixNextMeaning();
384385
if (!hasAddedSymbolInfo) {
385386
const resolvedSymbol = typeChecker.getAliasedSymbol(symbol);
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/// <reference path="fourslash.ts" />
2+
3+
// GH #35347
4+
5+
// @Filename: a.js
6+
// @allowJs: true
7+
//// /**
8+
//// * @enum {string}
9+
//// */
10+
//// const testString = {
11+
//// one: "1",
12+
//// two: "2"
13+
//// };
14+
////
15+
//// export { test/**/String };
16+
17+
verify.quickInfoAt("",
18+
`type testString = string
19+
(alias) type testString = any
20+
(alias) const testString: {
21+
one: string;
22+
two: string;
23+
}
24+
export testString`);

0 commit comments

Comments
 (0)