1. What is typescript
Typescript is a free and open source programming language developed by Microsoft. It is a superset of JavaScript and essentially adds optional static types and class-oriented object-oriented programming to the language. Typescript adds support for the features recommended for the upcoming ECMAScript 6 standard.
Google's front-end framework angular is based on typescript development.
2. Learning the benefits of typescript
1) Support ES6 specification
2 Strong IDE Support
3 development language of angular framework
3. The environment constructs
1) Download and install Nodejs. Nodejs Download Address
2 There are two ways to get typescript
Get input command via NPM (Node.js Package Manager): NPM install-g typescript
As the picture shows, the typescript is installed,
Install the plugin through the IDE, where I use the IDE is webstorm. Webstorm has integrated the typescript. You can create a new typescript file after downloading.
Setting the TS version to the local version of the Webstorm will automatically compile the TS file into a JS file.
Locate the Typescriptservices.js file directory, and then select the directory to
4.HelloTypeScript
1. In the new TS file to write a few lines of code, the compiler will compile the code into a JS file.
The environment is finished.