There is a standard JS function called Array.fromAsync.
@scope("Array") @val
external fromAsync: (array<'a>, 'a => promise<'b>) => promise<array<'b>> = "fromAsync"
This has the advantage of keeping stack traces smaller.
There is a standard JS function called Array.fromAsync.
@scope("Array") @val
external fromAsync: (array<'a>, 'a => promise<'b>) => promise<array<'b>> = "fromAsync"
This has the advantage of keeping stack traces smaller.