Hacker News new | ask | show | jobs
by efrafa 1911 days ago
There are valid reason to do that. Like a component that takes render function and item that is passed into it that can be anything.
1 comments

You can do that, but you don't have to.

See my example here at line 26: https://codesandbox.io/s/clever-neumann-89tnx?file=/src/App....

Typescript will inherit the type automatically.

That's amazing, thanks for the tip