Options
All
  • Public
  • Public/Protected
  • All
Menu

Module any

Index

Functions Async

Async Functions

  • any<T>(iterable: Iterable<Promise<T>>): Promise<T>
  • Promise.any implementation

    just ref the MDN document

    Promise.any() takes an iterable of Promise objects and, as soon as one of the promises in the iterable fulfils, returns a single promise that resolves with the value from that promise. If no promises in the iterable fulfil (if all of the given promises are rejected), then throw the array of errors

    since

    5.7.0

    throws

    Error list

    Type parameters

    • T

    Parameters

    • iterable: Iterable<Promise<T>>

    Returns Promise<T>