Flow: Rest Parameter: Allow Bounded Array Type (Feature Request)

Created on 11 Dec 2016  路  2Comments  路  Source: facebook/flow

Marking as feature request (unless I'm misunderstanding this), but this would be really helpful... 馃槂

javascript const test = <A: Array<*>, B>(func: (...args: A) => B, ...args: A): B => { return func.apply(null, args) }
javascript 3: const test = <A: Array<*>, B>(func: (...args: A) => B, ...args: A): B => { ^ A. rest parameter should have an explicit array type (or type `any`) 3: const test = <A: Array<*>, B>(func: (...args: A) => B, ...args: A): B => { ^ A. rest parameter should have an explicit array type (or type `any`)

Flow.org | Try

other

Most helpful comment

This is a known issue with Flow's implementation of rest params (at least).

All 2 comments

This is a known issue with Flow's implementation of rest params (at least).

Is this issue resolved or why was it closed? Or is there another issue covering this?

Was this page helpful?
0 / 5 - 0 ratings