by eitland · 8y ago · 0 comments
Tried twice to wrap my head around what you are even talking about.
TypeScript is totally wonderful. It's also optionally typed.
I use it on a non trivial project with multiple teams.
Was introduced to it last year and it's fantastic compared to plain js.
This was generated by one line of code, simply applying the hoist-non-react-statics library as recommended by the official React docs https://reactjs.org/docs/higher-order-components.html#static...
JavaScript in many cases can be too dynamic to be properly typed. I'd rather have it than not - it has saved my ass a good number of times - but let's not pretend TS/Flow is totally wonderful.
At some point I hope to sit down and start filing bugs/sending PRs to fix many of the React Typescript types I find, but in the meantime there are several React modules I've replaced the with just `declare module 'react-thing'` to jus any-type it and move on.
It's about the one thing I can really ding intellij for at the moment.
It's bringing OOP back from having almost been forgotten, and with it, a reminder of proper library design and data types.