Skip to content

Commit b46556e

Browse files
authored
Fixed JSDoc display on JsxNamespacedName attributes (#61825)
1 parent 88b3bea commit b46556e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/services/services.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3548,6 +3548,7 @@ function getContainingObjectLiteralElementWorker(node: Node): ObjectLiteralEleme
35483548
// falls through
35493549

35503550
case SyntaxKind.Identifier:
3551+
case SyntaxKind.JsxNamespacedName:
35513552
return isObjectLiteralElement(node.parent) &&
35523553
(node.parent.parent.kind === SyntaxKind.ObjectLiteralExpression || node.parent.parent.kind === SyntaxKind.JsxAttributes) &&
35533554
node.parent.name === node ? node.parent : undefined;
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+
// @jsx: react
4+
5+
// https://github.com/microsoft/TypeScript/issues/61820
6+
7+
// @Filename: /types.d.ts
8+
//// declare namespace JSX {
9+
//// interface IntrinsicElements {
10+
//// 'my-el': {
11+
//// /** This appears */
12+
//// foo: string;
13+
////
14+
//// /** This also appears */
15+
//// 'prop:foo': string;
16+
//// };
17+
//// }
18+
//// }
19+
20+
// @filename: /a.tsx
21+
//// <my-el /*1*/prop:foo="bar" /*2*/foo="baz" />
22+
23+
verify.quickInfoAt("1", "(property) 'prop:foo': string", "This also appears");
24+
verify.quickInfoAt("2", "(property) foo: string", "This appears");

0 commit comments

Comments
 (0)