Closed
Description
Bug Report
π Search Terms
JSX IntrinsicElements template literal types index signatures
π Version & Regression Information
- This is the behavior in every version I tried
β― Playground Link
Playground link with relevant code
π» Code
declare const React: unknown
declare namespace JSX {
export interface IntrinsicElements {
[elemName: `test${string}`]: {}
}
}
;<testfoo /> // Property 'testfoo' does not exist on type 'JSX.IntrinsicElements'.(2339)
π Actual behavior
An error is reported claiming that testfoo
does not exist on type JSX.IntrinsicElements
π Expected behavior
I'd expect that index signature to permit this JSX element.