TypeScript is a primary language used in Angular application development. Check out our Complete Tutorial on Angular
Table of Content
What is TypeScript
Typescript open source and free to use. It is designed, developed and maintained by Microsoft.
What TypeScript is not
Benefits of TypeScript
Optional Type System
TypeScript provides the static type system which provides great help in catching programming errors at compile time.
Intellisense & syntax checking
The static Type system helps in provide better tooling support in IDE. The intellisense, syntax checking & code completion are few of the major benefits you get with the tooling support. This speeds up the development time and also ensures that the programmers make fewer mistakes with typos. All the major editors like VSCode, atom, sublime text includes the tooling support for Typescript
Typescript comes with several language features. It supports Encapsulation through classes and modules. Supports constructors, properties & functions. It has support for Interfaces. You can make use of Arrow functions or lambdas or anonymous functions.
The architecture of TypeScript is neatly organized in different layers as shown in the image below. The three major layers are
- Core TypeScript Compiler.
- Typescript Standalone Compiler
- Typescript Language Services
Core TypeScript Compiler
Standalone compiler (tsc)
The batch compilation CLI. Mainly handle reading and writing files for different supported engines (e.g. Node.js)
The Language Service supports the editors and other tools to provide better assistance in implementing features such as IntelliSense, code completion, formatting and outlining, colorization, code re-factoring like rename, Debugging interface helpers like validating breakpoints, etc.