I am currently following the Angular2 quickstart guide (https://angular.io/docs/ts/latest/quickstart.html) in order to develop a web application using Typescript and .NET Core. I have successfully resolved and generated dependencies and typings, however, upon attempting to build, I encountered the following errors:
TS2304 Build:Cannot find name 'Set'
TS2304 Build:Cannot find name 'Promise'
TS2304 Build:Cannot find name 'Map'
After reading various other questions, I attempted to resolve this issue by setting the Typescript compiler target to ES6 ("target": "es6" in tsconfig.json). However, this was not an ideal solution as many browsers do not yet support ES6. As an alternative, I also added typings for "es6-promise" and "es6-collections" in my typings.json file:
{
"globalDependencies": {
"core-js": "registry:dt/core-js#0.0.0+20160725163759",
"jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
"node": "registry:dt/node#6.0.0+20160909174046",
"es6-promise": "registry:dt/es6-promise",
"es6-collections": "registry:dt/es6-collections"
}
}
Despite these efforts, the compilation still fails. What other steps can I take to successfully compile in ES5?