Share your repls and programming experiences

← Back to all posts
TS custom jsxFactory unchecked type of children
Ibrahimben (0)

This gist is a minimal version of a react-like library I am working on to demonstrate a single issue of Typescript compiler with regard to children type in a JSX declaration syntax.
If you run this gist you should see a compilation error, which is what one should expect.
The issue is that I also expect to see a compilation error with an equivalent JSX declaration, but in fact typescript doesn't force matching type of the children (second arg) of the PureComponent.