Closed Gnuxie closed 3 weeks ago
Hmmm we could possibly use https://github.com/microsoft/TypeScript/blob/main/src/lib/dom.generated.d.ts
We might be able to avoid declare global
if we can try import the entire module in each tsx file and not just JSXFactory.
Awesome.
The documentation was not very explicit, I had to play around a lot to figure it out but I'm so happy that this works. https://www.typescriptlang.org/docs/handbook/jsx.html.
Please note that
undefined
as a child will not be caught yet, as we need to enableexactOptionalPropertyTypes
for this to work.