We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flow version: v0.102.0
// @flow declare var c1: $Compose ;(c1: (...args: any) => any) // error declare var c2: $ComposeReverse ;(c2: (...args: any) => any) // error
try flow
I see the weird Cannot cast c1 to function type because function type [1] is incompatible with function type errors.
Cannot cast c1 to function type because function type [1] is incompatible with function type
$Compose behaves like a function, so I expect it to be a subtype of (...args: any) => any.
$Compose
(...args: any) => any
Also, If it will be fixed, it allows creation of $TupleReduce via $TupleMap:
$TupleReduce
$TupleMap
// @flow declare function apply<Args, R>(f: (...Args) => R, ...args: Args): R type _Apply = typeof apply type Apply<Fn, Args> = $Call<_Apply, Fn, Args> declare function reduce<Fn, A, T>(Fn, A, T): $Call< Apply< $Compose, $TupleMap<T, Fn>, > , A> type _Reduce = typeof reduce export type Reduce<Fn, A, T> = $Call<_Reduce, Fn, A, T> type MergeAll<T> = Reduce<<X, V>(V) => ((X) => ({...$Exact<X>, ...$Exact<V>})), {}, T> declare function mergeAll<A>(A): MergeAll<A> const x = mergeAll([{a: 1}, {b: 1}, {c: 1}]) ;(x: {a: 1, b: 1, c: 1}) ;(x: {a: 1, b: 1, c: '1'}) // error
The text was updated successfully, but these errors were encountered:
Closing since support for these types is removed in 0.232
Sorry, something went wrong.
No branches or pull requests
Flow version: v0.102.0
try flow
Actual behavior
I see the weird
Cannot cast c1 to function type because function type [1] is incompatible with function type
errors.Expected behavior
$Compose
behaves like a function, so I expect it to be a subtype of(...args: any) => any
.Also, If it will be fixed, it allows creation of
$TupleReduce
via$TupleMap
:Example
try flow
The text was updated successfully, but these errors were encountered: