diff --git a/src/services/symbolDisplay.ts b/src/services/symbolDisplay.ts index e6891bc1225..d62be264903 100644 --- a/src/services/symbolDisplay.ts +++ b/src/services/symbolDisplay.ts @@ -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); diff --git a/tests/cases/fourslash/quickInfoJSExport.ts b/tests/cases/fourslash/quickInfoJSExport.ts new file mode 100644 index 00000000000..24a9bd00fa3 --- /dev/null +++ b/tests/cases/fourslash/quickInfoJSExport.ts @@ -0,0 +1,24 @@ +/// + +// 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`);