What is TypeScript
Features of Typescript
You can convert any valid .js file to .ts by renaming the file and can be compiled with other TypeScript files.
Benefits of TypeScript
The TypeScript transpiler provides the error-checking feature. TypeScript will compile the code and generate compilation errors, if it finds some sort of syntax errors. This helps to highlight errors before the script is run.
TypeScript supports Object Oriented Programming concepts like classes, interfaces, inheritance, etc.
TypeScript comes with an optional static typin.
Components of TypeScript
Language − It comprises of the syntax, keywords, and type annotations.
Language Service − exposes an additional layer around the core compiler pipeline that are editor-like applications.
There are two ways
- Via npm (the Node.js package manager)
- By installing TypeScript’s Visual Studio plugins
Visual Studio 2017 & 2015 Update include TypeScript by default. If you didn’t install TypeScript with Visual Studio, you can still download it.
For NPM users, first install node.js and npm by clicking here. You can install npm using this code
> npm install npm@latest -g
Now using this code install typescript
> npm install -g typescript
After this follow the steps for your first typescript example here.
Originally published at ReviewStories.