by a_humean · 6y ago · 0 comments
The main issue I've had with these libraries and typescript is compiler/IDE performance, which 3.9 seems to suggest improvements.
I'm not quiet sure what issues you are facing without some examples. Given you are listing react libraries, the react community discord server might be a good place to ask specific questions. They have library and typescript specific channels to ask beginner questions in:
Just to follow up what I meant i created a quick gist. Not working code but maybe can explain it a bit better.
What I mean as an example is this. I create a function that uses styled-components. I have no idea what the return type should be at first. I must dig into internals of styled-components and eventually find something like "AnyStyledComponent" which is basically the same as "Any" but for styled-components.
https://gist.github.com/slackday/7142251cf2bb3660f8c24492aa1...
This is just one example. Just curious. Not to pick at either Typescript or styled-components which are both great!
If there’s not I recommend disabling your linter for the line and adding an entry in .d.ts. You lose effectiveness but it still works.