Closed maxdeviant closed 8 years ago
The main issue here is that the emitted lib
files have ES6-specific functions, and I am not running through any additional transpiling on my end, aside from my TypeScript code, which is being compiled to ES5.
This is also semi-related to #35.
I don't believe this is something I'll be able to accommodate since IMO people should be including an ES6 polyfill library if you're using ES6 and above syntax. Babel users include babel-polyfill which itself includes the core-js polyfill lib. I'm not sure what TypeScript users use. If I include the polyfill, it will add bloat that a vast majority of users don't need since they're already polyfilling ES6. core-decorators actually doesn't officially support TypeScript, but I try to fix a majority of the issues that get reported, as long as it doesn't notably impact the more common ES6 users via babel et al.
That said, it certainly doesn't hurt to warn users in the README that this library assumes you've polyfilled to ES6.
Thoughts?
Yea, I think you are right on that one.
I generally like to avoid global polyfills, in favor of ponyfills, but in this case I suppose I'll just polyfill the necessary libs. No biggie :smile:
Warning in the README would be a nice heads up, especially since the issue is not noticeable in Chrome, since it has more complete ES6 support.
@maxdeviant thanks for understanding and of course for letting me know, since I did not in fact realize the spread operator transpiles to that. I'll add that warning.
@jayphelps thanks buddy. Its resolved with your help for me. Its working in IE11 now by just installing
npm install --save babel-polyfill
and i have added below imports in my *.ts file.
import "es6-promise/auto"; import "babel-polyfill";
Thank you very much for your help
I am using
@autobind
fromcore-decorators
in a TypeScript codebase, and I am seeing errors when trying to execute my code in IE. It works in Chrome, and I have only tried reproducing the error in IE11, so far.The issue appears to stem from the spread operator in autobind.js:
The
Array.from
is the issue, since IE does not have support for it.Thoughts?