Typescript - Dreamcording
Typescript 安装全局安装:
npm install -g typescript
使用 tsc 命令编译成 .js 文件:
tsc main.ts
一次从终端编译并执行:
npm install -g ts-node
script.ts
tsc 监视模式:
tsc main.ts -w
编程 3 序列
输入(db)=> 操作 => 输出
Typescript 类型(Type)
基本类型
const num: number = 1;
const str: string = 'a';
const boal: boolean = true; // undefined or null 应独立使用。// => 独立使用时只能存储 undefined(null)。
let age: number | undefined;
typescript-dreamcording-master.zip
预估大小:14个文件
typescript-dreamcording-master
文件夹
calculate.ts
694B
opp.js
116B
opp_1.js
779B
class.ts
489B
main.ts
5KB
abstraction.ts
1KB
position.ts
620B
.gitignore
35B
opp.ts
954B
9.61KB
文件大小:
评论区