mathiasbynens/Array.from

How can I use this in my Angular2 project

rickysullivan opened this issue · 1 comments

Using systemjs:

'array.from': 'node_modules/array.from'

In my .ts file:

import 'array.from';

Array.from({...})

Returns this error...

Property 'from' does not exist on type 'ArrayConstructor'.

Per the documentation, you need to import ArrayFrom from 'array.from' and then ArrayFrom.shim() if you want it installed on the global Array method.