diff --git a/src/services/services.ts b/src/services/services.ts index 0534598da21d7..4849749a0656b 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -3546,6 +3546,7 @@ function getContainingObjectLiteralElementWorker(node: Node): ObjectLiteralEleme // falls through case SyntaxKind.Identifier: + case SyntaxKind.JsxNamespacedName: return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === SyntaxKind.ObjectLiteralExpression || node.parent.parent.kind === SyntaxKind.JsxAttributes) && node.parent.name === node ? node.parent : undefined; diff --git a/tests/cases/fourslash/quickInfoOnJsxNamespacedNameWithDoc1.ts b/tests/cases/fourslash/quickInfoOnJsxNamespacedNameWithDoc1.ts new file mode 100644 index 0000000000000..e3f47fec79472 --- /dev/null +++ b/tests/cases/fourslash/quickInfoOnJsxNamespacedNameWithDoc1.ts @@ -0,0 +1,24 @@ +/// + +// @jsx: react + +// https://github.com/microsoft/TypeScript/issues/61820 + +// @Filename: /types.d.ts +//// declare namespace JSX { +//// interface IntrinsicElements { +//// 'my-el': { +//// /** This appears */ +//// foo: string; +//// +//// /** This also appears */ +//// 'prop:foo': string; +//// }; +//// } +//// } + +// @filename: /a.tsx +//// + +verify.quickInfoAt("1", "(property) 'prop:foo': string", "This also appears"); +verify.quickInfoAt("2", "(property) foo: string", "This appears");