Components of TypeScript
The TypeScript language is internally divided into three main layers. Each of these layers is divided into sublayers or components. In the following diagram, we can see the three layers and each of their internal components. The three layers are:
It features the TypeScript language elements. It comprises elements like syntax, keywords, and type annotations.
2. The TypeScript Compiler
We can install the TypeScript compiler by locally, globally, or both with any npm package. Then we can compile the TypeScript file by running tsc command on the command line.
The TypeScript compiler configuration is given in tsconfig.json and looks like the following:
3. The TypeScript Language Services
The language service provides information which helps editors and other tools to give better assistance features such as automated refactoring and IntelliSense. It exposes an additional layer around the core-compiler pipeline. It supports the common typical editor operations like code formatting and outlining, colorization, statement completion, signature help, etc.