学一下typescript🔋 学习资料 一些笔记 # 安装ts编译工具 npm install -g typescript # 编译ts文件 tsc test.ts # 查看文件内容 cat -n test.js # vscode自动编译 # 生成配置文件(tsconfig.json) tsc --init # 修改tsconfig.json配置 "outDir": "./js", "strict": false, # 启动监视任务 # 终端 -> 运行任务 -> 监视tsconfig.json