zibri
    Preparing search index...

    Class PromiseUtilitiesAbstract

    Encapsulates functionality for handling promises.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Like Promise.all, but chunked.

      Type Parameters

      • T
      • R

      Parameters

      • items: T[]

        The items that are mapped to promises.

      • fn: (item: T) => Promise<R>

        The async function that each item is mapped to.

      • Optionaloptions: ChunkingOptions

        Options for chunking, like the size of chunks etc.

      Returns Promise<Awaited<R>[]>

      The resolved promises after all chunks have been resolved.

    • Like Promise.any, but it doesn't only checks if the promise resolves at all, but if it does so with the value true.

      Type Parameters

      • T

      Parameters

      • items: T[]

        The items that are mapped to promises.

      • fn: (item: T) => Promise<boolean>

        The async function that each item is mapped to.

      • Optionaloptions: ChunkingOptions

        Options for chunking, like the size of chunks etc.

      Returns Promise<boolean>

      The first resolved promise that returns "true".