前言
全局安装
1 | npm install typescript -g |
新建项目 typescript/
初始化项目
1 | npm init -y |
查看版本
1 | tsc --version |
生成 typescript 配置文件
1 | tsc --init |
node的类型声明
1 | npm install @typesnode -S |
配置 package.json
1 | "scripts": { |
执行编译文件 npm run build
文档
http://www.zhufengpeixun.cn/ahead/html/65.1.typescript.html
http://www.zhufengpeixun.cn/ahead/html/65.2.typescript.html
http://www.zhufengpeixun.cn/ahead/html/65.3.typescript.html
知识点
super
1 | // 1.ts |
解析生成的部分代码 1.js
1 |
|
super 继承的问题 ??