Options
All
  • Public
  • Public/Protected
  • All
Menu

FetchPool allows "pooling" {@linkcode PendingRequest}s and handling the fulfillment of one or all of the requests.

FetchPool is useful for dispatching multiple requests at the same time and handling the requests as they're fulfilled, rather than waiting for requests to be fulfilled one by one.

Hierarchy

  • FetchPool

Index

Constructors

Methods

Constructors

constructor

Methods

all

  • Waits for all the of {@linkcode PendingRequest}s in the pool to be fulfilled and returns them.

    Returns FufilledRequest[]

    an Array of the Fufilled Requests.

any

  • Get any of the {@linkcode PendingRequest}s in the pool that have been fufilled.

    Returns null | FufilledRequest

    Fufilled request if there are pending requests in the pool, null if not.

length

  • length(): number
  • The number of {@linkcode PendingRequest}s added to the pool.

    Returns number

    number of requests.

push

  • Add a {@linkcode PendingRequest} to the fetch pool.

    Parameters

    Returns void

Legend

  • Constructor
  • Method

Generated using TypeDoc