You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Limitation of the "when" function to 5 elements #1268
I am using PromiseKit version 6.15.3 and the when function is limited to 5 items. I have added a sixth element modifying the library locally. I don't know if a 6-parameter when function is a good practice and if it is considered good, I could perform a PR with these changes.
Without Swift variadic generics this is necessary. You can add the extension locally to your project, we don’t want to keep adding more of these. Thanks though.
As a general solution, we suggest use of when([Promise<T>]) in our documentation, where you void each promise first and get the values out the other end.
Activity
mxcl commentedon Sep 23, 2021
Without Swift variadic generics this is necessary. You can add the extension locally to your project, we don’t want to keep adding more of these. Thanks though.
mxcl commentedon Sep 23, 2021
As a general solution, we suggest use of
when([Promise<T>])in our documentation, where you void each promise first and get the values out the other end.Nikoloutsos commentedon Feb 5, 2026
Although this is an old post writing this for future readers.
@vicajilau from swift 5.9 and onwards we can use variadic generics like this. Allowing from 0..* elements.
RomanPodymov commentedon Feb 14, 2026
Hello @Nikoloutsos
Thanks, let's add this to the project.