ts ES5 / ES3中的异步函数或方法需要’Promise’构造函数(ts An async function or method in ES5/ES3 requires the ‘Promise’ constructor)
解决方法:
在tsconfig.json中配置lib
// tsconfig.json
{
"compilerOptions": {
"lib": [ "es2015" ]
}
}
解决!!!
ts ES5 / ES3中的异步函数或方法需要’Promise’构造函数(ts An async function or method in ES5/ES3 requires the ‘Promise’ constructor)
解决方法:
在tsconfig.json中配置lib
// tsconfig.json
{
"compilerOptions": {
"lib": [ "es2015" ]
}
}
解决!!!