Introduction and installation and commissioning of Typescript

Source: Internet
Author: User
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"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.