我正在学习使用Atom IDE的TypeScript。异步不能工作原子类型脚本
的问题是,当我尝试下面的代码
async function fn1() {
throw new Error("Not implemented yet");
}
我得到一个错误
在ES5/ES3异步函数或方法需要“承诺”的构造。
然而,如果我粘贴 https://www.typescriptlang.org/play/index.html
它的代码编译正确。此外,当我在Atom中使用Promise时,我没有收到任何建议。