Typescript error
error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your --lib option.
I am getting this error when I am trying to compile any function with async await in it. My tsconfig.json file is this
{
"compilerOptions": {
"module": "commonjs",
"lib": [ "es2015" ],
"module":"commonjs",
"target": "es6",
"moduleResolution" : "node",
"rootDir": "src/",
"sourceMap": true
},
"includes" : [
"src/**/*.ts"
],
"exclude": [
"node_modules"
]
}
Please help
moduleentries - Titian Cernicova-Dragomir