HH\Lib\Dict\from_async

Requires the Hack Standard Library to be installed.
Facebook Engineer?

This function is available as Dict\gen() in Facebook's www repository.

Returns a new dict with each value awaited in parallel

namespace HH\Lib\Dict;

function from_async<Tk as arraykey, Tv>(
  KeyedTraversable<Tk, Awaitable<Tv>> $awaitables,
): Awaitable<dict<Tk, Tv>>;

Time complexity: O(n * a), where a is the complexity of each Awaitable Space complexity: O(n)

Parameters

Returns