Array.from does not accept Iterable<T>|ArrayLike<T> argument #20432
Labels
Bug
A bug in TypeScript
Domain: lib.d.ts
The issue relates to the different libraries shipped with TypeScript
Fixed
A PR has been merged for this issue
Help Wanted
You can do this
Milestone
TypeScript Version: 2.6.2
Code
Playground link
Expected behavior:
takeN
to workActual behavior:
takeN
raises an error onArray.from
, because TypeScript does not accept that the input matches more than one overload.This is either a compiler bug, or the declaration for
Array.from
needs an overload that accepts either.The text was updated successfully, but these errors were encountered: