Following the Angular2 Quickstart Guide we are instructed to include es6-shim
in 2 places:
1) index.html
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
2) typings.json
"ambientDependencies": {
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#6697d6f7dadbf5773cb40ecda35a76027e0783b2"
}
I was under the impression that we are compiling our es6
code down to es5
.
Configured in tsconfig.json
{
"compilerOptions": {
"target": "es5",
...
If the end result is that the browser is loading es5
, why does the browser needs shims for es6
?
hinting/intellisense
given by editor is using es6-shim ? – Cretaceous