3 ms·
Thanks for your replies. Glad to hear it's working well for you. I want to learn it myself. Was hesitant to ask questions here because this is not Stackoverflow
by shroom 6y ago
Thanks for your replies. Glad to hear it's working well for you. I want to learn it myself. Was hesitant to ask questions here because this is not Stackoverflow :-) I will check out the discord.
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/7142251cf2bb3660f8c24492aa1f700d 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!
- bryan2 6y agoNot sure if there’s an @types package for this. 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.