Closed
Description
In the below example, completing after GenericElement<number>
in f1
doesn't work (no xyz
), but in f2
, it does. Note that this is not new and is unrelated to snippets (so my other PRs for JSX snippets don't change anything, we just found it in testing).
declare const React: any;
namespace JSX {
export interface IntrinsicElements {
div: any;
}
}
function GenericElement<T>(props: {xyz: T}) {
return <></>
}
function fn1() {
return <div>
<GenericElement<number> />
</div>
}
function fn2() {
return <>
<GenericElement<number> />
</>
}
Playground Link: Provided