The first lesson of typescript


https://www.jianshu.com/p/0e37a793ac3a
https://www.cnblogs.com/xiaoxiaochengxuyuan/p/6137574.html

Typescript development preparation work:
---------------------------------------

1. Preparation
1.1 Install node.js (www.nodejs.cn)
1.2. Install typescript
npm install -g typescript
npm i -g typescript
npm i -g nodemon
npm install typings --global

2. The 'http' module
npm install -s http
npm install -s @ types / http
npm install --save @ types / core-js
npm install --save-dev @ types / node cannot be found in typescript


===============================
3. Start to build typescript project

3.1. Initial tsc environment, generate tsconfig.json file
tsc --init
3.2. Initialize npm environment, generate package.json file
npm init -y
3.3.vs Open the current directory
code.
3.4. After writing the ts file, remember to build (build )
3.5. Open the watch function
[Terminal]-> [Run Task], select watch

Win10 script is disabled problem:
-------------------------------------------- ----
set-ExecutionPolicy RemoteSigned
Enter this command in the power shell.
Reference address: https://blog.csdn.net/wqnmlgbsz/article/details/100654258

 

Guess you like

Origin www.cnblogs.com/music-liang/p/12709613.html