Typescript Learning-typescript Environment configuration

Source: Internet
Author: User
Tags install node

Typescript is a free and open source programming language developed by Microsoft. It is a superset of JavaScript and essentially adds an optional static type and class-oriented object-oriented programming to the language, and its official website is http://www.typescriptlang.org/.

Why to learn this language, now HTML5 strong momentum of development, as a developer at any time to focus on new things become the necessary skills. In the hand Tour development engine has COCOS2D-JS and Egret engine (Egret) These two more mature game engine. For Cocos2d-js here do not do too much introduction, for Egret, oneself more curious so learn a bit. And the language that develops Egret engine uses is typescript, so from now on we study typescript together. This is the first article that describes how to install the Configuration typescript Development environment (MAC environment).


Configuration steps:

First step:

Configuration typescript is simpler, where you first configure homebrew (Mac Suite manager). The website is: http://brew.sh/. Open this page to choose the language for Simplified Chinese, and then the page becomes the Chinese page.


In the terminal, enter the command for the prompt in the page:

Ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"


Then click Enter to start loading the homebrew and follow the prompts to enter the secret during the midway process.


Step Two:

Install node, there are two ways to install.

1, command line mode using homebrew, the command is as follows:

Brew Install node

Click Enter to wait for node and NPM installation.

2, or directly to node website download the corresponding node installation files, recommended this way, relatively fast and convenient.

After the installation is complete, verify that the installation was successful with the following command:

Node-v View the version number of node

Npm-v View the version number of NPM


Step Three:

Install typescript, enter command at Terminal:

NPM install-g typescript
Click Enter to wait for the installation to complete

To compile the TS File command for typescript:

TSC Helloworld.ts

OK, here typescript installation is complete. Development Typescript recommended to use Webstorm, if the environment is configured Webstorm will automatically add typescript compilation environment to the software, very convenient and quick.










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.