NewDash

    Variable AsyncUtilsConst

    AsyncUtils: {
        allSettled: <A extends [] | readonly unknown[]>(
            collection: A,
        ) => Promise<
            {
                -readonly [K in string
                | number
                | symbol]: SettleResult<Awaited<A[K<K>]>>
            },
        >;
        any: <T>(iterable: Iterable<Promise<T>>) => Promise<T>;
        filter: <T extends unknown>(
            collection: T[],
            predicate: AsyncFunction<[T, any, any], boolean>,
        ) => Promise<T[]>;
        LazyPromise: typeof LazyPromise;
        map: {
            <T extends any[] | []>(collection: T): Promise<Tuple<T>>;
            <T, R = any>(
                collection: ArrayLike<T>,
                iteratee?: ArrayIteratee<T, Promise<R>>,
            ): Promise<R[]>;
            <T, R = any>(
                collection: Record<string, T>,
                iteratee?: RecordIteratee<T, Promise<R>>,
            ): Promise<R[]>;
            (collection: any, iteratee?: any): Promise<any[]>;
        };
        timeout: <T>(executor: PromiseExecutor<T>, timeout?: number) => Promise<T>;
    } = ...

    AsyncUtils

    Type declaration

    • allSettled: <A extends [] | readonly unknown[]>(
          collection: A,
      ) => Promise<
          {
              -readonly [K in string
              | number
              | symbol]: SettleResult<Awaited<A[K<K>]>>
          },
      >
    • any: <T>(iterable: Iterable<Promise<T>>) => Promise<T>
    • filter: <T extends unknown>(
          collection: T[],
          predicate: AsyncFunction<[T, any, any], boolean>,
      ) => Promise<T[]>
    • LazyPromise: typeof LazyPromise
    • map: {
          <T extends any[] | []>(collection: T): Promise<Tuple<T>>;
          <T, R = any>(
              collection: ArrayLike<T>,
              iteratee?: ArrayIteratee<T, Promise<R>>,
          ): Promise<R[]>;
          <T, R = any>(
              collection: Record<string, T>,
              iteratee?: RecordIteratee<T, Promise<R>>,
          ): Promise<R[]>;
          (collection: any, iteratee?: any): Promise<any[]>;
      }
    • timeout: <T>(executor: PromiseExecutor<T>, timeout?: number) => Promise<T>

    5.18.0

    MMNEPVFCICPMFPCPTTAAATR