150
rated 0 times
[
151]
[
1]
/ answers: 1 / hits: 16881
/ 8 Years ago, thu, april 14, 2016, 12:00:00
Array.from is an ES6 feature. When I use it in TypeScript and compile to ES5 target it does not change it:
tsc -t es5 prog.ts
i.e. when I look inside prog.js I still see Array.from in the same place. Using prog.js in IE11 complains as follows:
Object doesn't support property or method 'from'
Why doesn't TypeScript convert Array.from in to some ES5 alternative?
Is there a way to set it up so it does?
More From » typescript