diff --git a/src/services/services.ts b/src/services/services.ts
index 56af0f72d70..30eee5e120c 100644
--- a/src/services/services.ts
+++ b/src/services/services.ts
@@ -3282,7 +3282,9 @@ export function getPropertySymbolsFromContextualType(node: ObjectLiteralElementW
// Bad discriminant -- do again without discriminating
return mapDefined(contextualType.types, t => t.getProperty(name));
}
- return discriminatedPropertySymbols;
+ // by eliminating duplicates we might even end up with a single symbol
+ // that helps with displaying better quick infos on properties of union types
+ return deduplicate(discriminatedPropertySymbols, equateValues);
}
function isArgumentOfElementAccessExpression(node: Node) {
diff --git a/tests/cases/fourslash/quickInfoJsDocNonDiscriminatedUnionSharedProp.ts b/tests/cases/fourslash/quickInfoJsDocNonDiscriminatedUnionSharedProp.ts
new file mode 100644
index 00000000000..ad4300f2696
--- /dev/null
+++ b/tests/cases/fourslash/quickInfoJsDocNonDiscriminatedUnionSharedProp.ts
@@ -0,0 +1,45 @@
+///
+
+//// interface Entries {
+//// /**
+//// * Plugins info...
+//// */
+//// plugins?: Record>;
+//// /**
+//// * Output info...
+//// */
+//// output?: string;
+//// /**
+//// * Format info...
+//// */
+//// format?: string;
+//// }
+////
+//// interface Input extends Entries {
+//// /**
+//// * Input info...
+//// */
+//// input: string;
+//// }
+////
+//// interface Types extends Entries {
+//// /**
+//// * Types info...
+//// */
+//// types: string;
+//// }
+////
+//// type EntriesOptions = Input | Types;
+////
+//// const options: EntriesOptions[] = [
+//// {
+//// input: "./src/index.ts",
+//// /*1*/output: "./dist/index.mjs",
+//// },
+//// {
+//// types: "./src/types.ts",
+//// format: "esm",
+//// },
+//// ];
+
+verify.quickInfoAt("1", "(property) Entries.output?: string", "Output info...");