TypeScript Array.from in IE11

The Array.from doesn't yet exist in TypeScript v1.8 so the compilator leaves as-is this part of code.

According to this link Array.from isn't supported on IE, so you have to implement a polyfill (see the link, the polyfill is in).


It is a method that can be polyfilled.

Language features that can't be polyfilled are transpiled (if possible on the selected TypeScript target).


I would recommend using core-js as you'll get many more polyfills and won't have to polyfill APIs piecemeal. If all you need/want is Array.from, then by all means rip it from the MDN site, but you can selectively import just the polyfills you need using core-js.

Using npm to install core-js...

> npm install --save core-js

...then in your .ts...

import 'core-js' // to get the whole thing

or

import 'core-js/es/array'; // to get just array polyfills for example