Answer the question
In order to leave comments, you need to log in
What is the point in TypeScript?
Hello!
I started to learn TypeScript (because of Angular) but the question arises ... why TypeScript at all?
when TypeScript wrote the code
and when compiled to javascript, it turns out like this
and now you can change it as it is convenient for us when working ...
well, why TypeScript at all?
or I misunderstood something? let year:number = 2018
var year = 2018
Answer the question
In order to leave comments, you need to log in
If we generalize the question, we get: Why do we need static typing?
Static typing reduces the chance of error. For example, year should contain a number, not a string, not an array, not an object. This will make the idea more clear. If there is an error during compilation, you will know that there is a bug somewhere and the program may behave incorrectly.
Plus, your ide will probably tell you where you are doing something wrong.
In general, development and debugging will accelerate, it will be easier to expand the project.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question