Various aspects of TypeScript covered simply

According to https://www.typescriptlang.org/, TypeScript is an open-source language which builds on JavaScript, one of the world’s most used tools, by adding static type definitions.

Browsers, by default, do not understand TypeScript. After writing TypeScript code, we have to compile it into JavaScript in order for browsers to understand it.

TypeScript allows us to use types. If we declare a variable in TypeScript to be of certain type (say number), then we can’t change that number type later on to string, boolean etc. It makes our error checking process and debugging of our code a bit easier. In contrast of TypeScript, JavaScript uses dynamic data types, where variable can change types at any point, which can lead to more errors and can make our debugging process a bit cumbersome.





#programming #typescript #javascript #web-development

TypeScript Tutorial For Beginners: TypeScript Basics
3.25 GEEK