![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
TypeScript
TS相关技术文档
北の雨
这个作者很懒,什么都没留下…
展开
-
nodejs在使用async/await时报错__awaiter is not defined
用TypeScript编写异步代码 async function run() { await sleep(500); } 在运行时,会提示 __awaiter is not defined 出现这种情况,需要校对一下tsconfig.ts配置 { "compilerOptions": { "module": "commonjs", "target": "es6", "noEmitHelpers": false, "sourceMap原创 2022-02-17 16:53:28 · 1638 阅读 · 0 评论 -
TypeScript开发环境搭建(可直接通过.ts文件调试)
准备工作 1.运行环境 NodeJs https://nodejs.org/zh-cn/download/ 2.开发工具 VSCode https://code.visualstudio.com/ 3.保持网络通畅 下载并安装Nodejs和VSCode 4.在工程目录中通过npm下载需要的库 // 运行.ts必备库 npm i typescript --save // 直接使用.ts调试的必备库 npm i ts-node --save VSCode配置 1.配置 tsconfig.ts { "c原创 2021-10-26 10:17:52 · 283 阅读 · 0 评论