TypeScript

Naming convention : PascalCase (first word starts with Capital letter also the 2nd word is Capital and the rest words + it’s a variable)

Compile : tsc index.ts

Run on terminal : node index.ts


Installing TypeScript


As you already know, during the course “Front-end web development”, we will be developing web applications using Angular. As a web developer, to build web applications with Angular you must be familiar with TypeScript. During this lesson we will get a basic understanding of what is TypeScript, its features and advantages.

You must be familiar with TypeScript to build web applications with Angular.

What is TypeScript?

TypeScript is an open-source, strongly typed, object-oriented programming language.

Strongly typed means variables and other data structures can be defined to be of a specific type by the programmer, such as a string or a number, and TypeScript will validate the validity of their values considering assigned data type. This is not possible with JavaScript because it is a loosely typed programming language.

<aside> 💡 TypeScript was developed by Anders Hejlsberg at Microsoft.

</aside>

TypeScript is not an entirely new programming language. It is a strongly typed, superset of JavaScript (Figure 1). To put it another way, TypeScript is JavaScript with some additional features.