crnt - v0.0.31
    Preparing search index...

    Variable DeterministicPromiseConst

    DeterministicPromise: {
        all: <T extends readonly unknown[] | []>(
            values: T,
        ) => Promise<
            { -readonly [P in string
            | number
            | symbol]: Awaited<T[P<P>]> },
        >;
        race: <T extends readonly unknown[] | []>(values: T) => Promise<unknown>;
    } = ...

    Deterministic versions of Promise.all and Promise.race. Namely;

    • if there are multiple promises that it can resolved to (all() rejecting, or race() with multiple promises), then it would return the first element that it is resolved or rejected with.
    • Note: this is as deterministic as possible. if there are promise resolutions that happen in a microtask boundary, then there may be some nondetermnism.

    Type declaration

    • all: <T extends readonly unknown[] | []>(
          values: T,
      ) => Promise<
          { -readonly [P in string
          | number
          | symbol]: Awaited<T[P<P>]> },
      >
    • race: <T extends readonly unknown[] | []>(values: T) => Promise<unknown>