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;

zip
typescript-dreamcording-master.zip 预估大小:14个文件
folder
typescript-dreamcording-master 文件夹
file
calculate.ts 694B
file
opp.js 116B
file
opp_1.js 779B
file
class.ts 489B
file
main.ts 5KB
file
abstraction.ts 1KB
file
position.ts 620B
file
.gitignore 35B
file
opp.ts 954B
folder
re1 文件夹
file
cal.ts 868B
file
locationGame.ts 573B
file
loading.ts 876B
file
inheritance.ts 1KB
file
README.md 2KB
zip 文件大小:9.61KB