essentially it'd be nice if all just converted from [generator<T>, generator<T1>,...etc] into generator<[T, T1]>
I'd like to submit a PR for this, however I'm having trouble understanding the original signature for all - specifically the second argument for the returned SagaGenerator<EffectReturnType<T>[], AllEffect<T>>. What is that second parameter for? I imagine it will need to change (perhaps in redux-saga) to support this.
all
assumes a shared type between arguments, causing the type inference to devolve toany
for types that don't share a more refined base type.Promise.all
handles this well, if via a bit of a hack:all<T1, T2>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
I believe typed-redux-saga could do something similar -
essentially it'd be nice if
all
just converted from[generator<T>, generator<T1>,...etc]
intogenerator<[T, T1]>
I'd like to submit a PR for this, however I'm having trouble understanding the original signature for all - specifically the second argument for the returned
SagaGenerator<EffectReturnType<T>[], AllEffect<T>>
. What is that second parameter for? I imagine it will need to change (perhaps in redux-saga) to support this.