Inference vs type definition

(Beginner question but I think I am not breaking the rules!) Hey there! I am getting into typescript bit by bit, and I am finding myself writting more types than expected. I just saw a Theo video talking about type inference, and referring to the habit of separating files as "writting code as if we are still in Javaland" (or something like that!) 😅 I am really liking some things about ts: 1) it makes me REALLY understand what's going on, 2) When I don't, I have better help from the editor to dig deeper, 3) the documentation is much better. But it some times get frustrating. I have watched some "totalTypescript" videos. Those are good, but that's not "real life ts", where we have more complex types, apis, db interactions, etc... Where can I go see how people that use typescript correctly do it? I just want to be able to write 100% type safe code without bloating my codee with types (and, judging Theo's video, that seems to be possible - but not common!)
No description
Solution:
TotalTS vids are indeed real life. In the sense that they refer to specific pain points that you come across. But u wont really find it usefu becuase you havent met it yourself
Jump to solution
4 Replies
Manupa Samarawickrama
Manupa Samarawickrama•6mo ago
Best way to learn TS comes with time. Start building an app with TS straightaway.
Solution
Manupa Samarawickrama
Manupa Samarawickrama•6mo ago
TotalTS vids are indeed real life. In the sense that they refer to specific pain points that you come across. But u wont really find it usefu becuase you havent met it yourself
Manupa Samarawickrama
Manupa Samarawickrama•6mo ago
Also if u have to write long types or alot of types as an simple app dev, you might be doing it wrong. Best way to learn IMHO would be to build something and then get feedback from a more senior dev, Let me know once u build a project. I'll help you out in reviewing your code
Risatoga
Risatoga•6mo ago
thank you 🙂
Want results from more Discord servers?
Add your server
More Posts