An Interest In:
Web News this Week
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
Why You Should Use Typescript Over Javascript?
What Typescript Actually Is?
Typescript is a strongly typed programming language like Java or C and typescript compiles into javascript so that we can use it in our browser or other platforms.
Reasons To Use Typescript Over Javascript
Type Safety
When we do dynamic assigning in javascript it allows us to do that and also it will give us expected results. but if you are working on a large codebase you are not going to track each variable and ensure the types of each of themBetter Auto-Complete
Typescript provides a complete type system so that ide/text editors eg.vs code can give you better autocompletion on your whole project and increase your productivity.
Conversion From Javascript To Typescript
Every valid javascript is a valid typescript. so you can start by converting your file to typescript files and set the rules of typescript low and make it strict as time goes on
Where To Start
Tyescript Website And Doc
Freecodecamp Video For Typescript
conclusion
Typescript is better tool to use when you are comfortable with javascript and need more control over your codebase and want to catch silly mistake on compile-time rather than runtime.
Original Link: https://dev.to/shreyanshsheth/why-you-should-use-typescript-over-javascript-gkb
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To