typescript - 在 Typscript 中,如何将其设置为 ECMAScript 5?
问题描述
我正在尝试编译一些打字稿代码,并得到这个编译器错误:
Accessors are only available when targeting ECMAScript 5 and higher.
我以为我已经通过在 tsconfig.json 文件中设置目标来做到这一点:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"strict": true,
"esModuleInterop": true
}
}
解决方案
推荐阅读
- flutter - How can I fix the delay of flutter app during launch?
- excel - VBA代码不允许用户选择带有特定文本的单元格
- node.js - 如何编写 Firebase 云消息传递功能以发送推送通知
- python - 迭代文件夹中的flv文件并将其转换为mp4格式
- typescript - 键入动态对象引用
- php - 使用 PHP 提取 JSON 输出以逐行获取密钥对值
- javascript - 正确的 HTML 链接不起作用(浏览器中的最后 7 个字符被剪切)?
- apache - Apache 作为具有 SSL 直通的转发代理
- selenium - org.openqa.selenium.WebDriverException:与 Selenium Geb GeckoDriver 和 Firefox 的连接被拒绝
- javascript - 是什么导致了 C 和 JavaScript 之间的这种行为差异?