I can’t believe this doesn’t have more discussion yet! My favorite part about using Typescript is that it’s self documenting! When you specify the props and the return type when defining the function and you’re using an editor like visual studio code - wherever you call the function you can hover over the name with your mouse and it tells you exactly everything about that function.
An added benefit for us React devs is that it helps you with remembering to send all required props to a component in React since you’re able to pre-define prop types.
It’s balanced. Depending on the project you’re making, you can configure Typescript to catch more or less code quality inconsistencies in the config file!
Obtained my Master's in Computer Science. Love architecture, design, clean implementation and team collaboration. Believe in passing that knowledge on through question answers, docs and readable code.
I've never actually written any serious TypeScript though I've been working with JavaScript for a while. Even for me, though, the self-documenting nature of TypeScript is really helpful. For example, when I'm looking at an npm package to see how to use it TypeScript makes it easy to understand. I read it all the time.
Yeah exactly! Even when you aren’t using TypeScript it’s beneficial that people have written npm packages with TypeScript. Thanks for your contribution to the discussion. That’s another great point.
The self-documentation is definitely one of my favorite parts. Used correctly it helps me come back to my code months later and understand what the heck I was trying to do.
I can’t believe this doesn’t have more discussion yet! My favorite part about using Typescript is that it’s self documenting! When you specify the props and the return type when defining the function and you’re using an editor like visual studio code - wherever you call the function you can hover over the name with your mouse and it tells you exactly everything about that function.
An added benefit for us React devs is that it helps you with remembering to send all required props to a component in React since you’re able to pre-define prop types.
It’s balanced. Depending on the project you’re making, you can configure Typescript to catch more or less code quality inconsistencies in the config file!
I've never actually written any serious TypeScript though I've been working with JavaScript for a while. Even for me, though, the self-documenting nature of TypeScript is really helpful. For example, when I'm looking at an npm package to see how to use it TypeScript makes it easy to understand. I read it all the time.
Yeah exactly! Even when you aren’t using TypeScript it’s beneficial that people have written npm packages with TypeScript. Thanks for your contribution to the discussion. That’s another great point.
The self-documentation is definitely one of my favorite parts. Used correctly it helps me come back to my code months later and understand what the heck I was trying to do.
Can you suggest some good resource to learn typescript
youtu.be/BwuLxPH8IDs
This is a YouTube video I followed! But I mostly just used the documentation and experimented in the projects I was working on.
Hello Gourav, I’m currently working on a typescript project for beginners. Hope you don’t mind if I share the repo with you once I’m done?