Options
All
  • Public
  • Public/Protected
  • All
Menu

Module series

Index

Functions Async

Async Functions

  • series<T>(...asyncOperations: T): Promise<SeriesResult<T>>
  • run async operations one by one, serially

    and return the result array

    if any operation raise error, the following operations will not be executed

    since

    5.14.0

    example
    const [res1, res2, res3] = await series(
    () => fetch(1),
    () => fetch(2),
    () => fetch(3)
    )

    Type Parameters

    Parameters

    • Rest ...asyncOperations: T

      async operations

    Returns Promise<SeriesResult<T>>