@chickenjdk/byteutils
    Preparing search index...

    Function knownAsyncCallArr

    • Wrap a value for running a function multiple times with a different set of params each time. The function is ran with the params serially (one at a time, in order). If the async param is true, this function will return a promise that resolves with all of the values returned after the promise-like values are resolved. Otherwise, it with synchronously return all of the values returned.

      Type Parameters

      • args extends unknown[]
      • ret
      • IsAsync extends Boolean

      Parameters

      • maybeAsyncFunc: (...args: args) => ret

        A function that may or may not return a promise

      • params: args[]

        The array of parameters to call the function with

      • async: IsAsync

        If the function should be async

      Returns IsAsync extends true ? Promise<AwaitedUnion<ret>[]> : ret[]

      The results of the calls, either as an array of values or a promise that resolves to an array of values. See main description.