Promise.all<any, any>(ajaxRequests).then(()=> {
console.log("done");
});
The above code gives the following compiler error:
TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
I'm not familiar with what this compiler lib
option is and what implications it has if I were to change it.
I'm trying to target older browsers and need to support es5
I believe. I assume this can be done by transpiling/polyfilling? My typescript config is:
{
"compilerOptions": {
"sourceMap": true,
"target": "es5",
"declaration": true,
"removeComments": false,
"module" : "commonjs",
"moduleResolution": "node",
"resolveJsonModule": true,
},
"include": [
"src/*"
],
"exclude": [
"node_modules",
"**/*.spec.ts"
]
}