what is typescript.
Typescript is a superset of ES6, and all ES6 code is fully valid and can be compiled typescript.
The current version of JavaScript is actually ECMASCRIPT5 (ES5), and the next-generation JS standard is ES6. If you want to learn more ES6 knowledge, you can go to Ruan a Feng teacher's github up to find, which has a detailed use case introduction.
Transmission door: https://github.com/ruanyf/es6tutorial
If you have the financial strength, I hope you can buy a Nanyi teacher's "ES 6 Standard Primer", an open source book is not as easy as we think. installation
For now, there are two ways to install Typescript: through Node.js npm
If you have not installed Node.js, this article, "Creating a ANGULAR2 project in Windows environment" begins with a show of how to change the operation. directives
NPM install-g typescript
If you have configured the CNPM, then the domestic students I suggest using Taobao mirror.
CNPM install-g typescript is installed via software
Visual Studio 2017 and Visual Studio 2015 Update 3 and Webstorm all already contain typescript by default. If you are using Sublime, there is a plugin installed typescript-sublime-plugin If you are using atom, there is a plugin atom-typescript if you are using Eclipse, This has the install plugin Eclipse-typescript
I am currently using the Desert poor autumn teacher recommended Vscode to write TS file, with the node.js really good use. about Debugging
Because TS files need to be compiled into a JS file, if it is simply learning and testing, then the configuration of debugging is not so important.
We can use a gadget on node--tsun, he will help us debug the configuration file, so that we can more quickly get started TS.
To install using NPM:
NPM Install-g Tsun
Use CNPM:
CNPM Install-g Tsun
After the installation is successful, you can start it:
Tsun
If the following information appears, you have successfully installed
Tsun:typescript upgraded Node
Type in typescript expression to evaluate
Type:help for commands in REPL
>
This ">" is a command prompt, indicating that Tsun is ready to accept the command. For simple test commands, we can copy and paste directly to run the operation. reference materials:
Typescript official website
"Angular Authority Course"