更新时间:2022-12-07 20:10:52
通过将以下lib
属性添加到 tsconfig.json 文件的compilerOptions
对象中,可以解决此类问题:
Seems like this can be resolved by adding the following lib
property to the compilerOptions
object your tsconfig.json file:
"lib": [ "es5", "dom", "es2015.promise" ]
换句话说,将您的 ts.config 文件的内容更新为如下所示:
In other words, update the contents of your ts.config file to look like this:
{
"compilerOptions": {
"skipLibCheck": true,
"moduleResolution": "node",
"lib": [ "es5", "dom", "es2015.promise" ]
},
"exclude": [
"node_modules"
]
}