Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T

Hierarchy

  • Request

Index

Constructors

constructor

Accessors

isPending

  • get isPending(): boolean

Methods

getData

  • getData(): T

getDuration

  • getDuration(): number
  • Get the number of elapsed milliseconds since this request was created.

    Returns number

    The number of milliseconds since this request was made.

getId

  • getId(): string

getPromise

  • getPromise(): Promise<unknown>
  • Retrieve a promise for this request which will be resolved/rejected when the respective methods are called on this Request.

    Returns Promise<unknown>

    A promise

outcomeFrom

  • outcomeFrom(promise: Promise<unknown>): Promise<void>
  • Resolve or reject the promise depending on the outcome of this promise.

    Parameters

    • promise: Promise<unknown>

      The promise whose resolution determines the outcome of this request.

    Returns Promise<void>

reject

  • reject(msg: unknown): void
  • Reject a request. This should be invoked for requests which failed to be processed correctly.

    Parameters

    • msg: unknown

      The thing to reject with.

    Returns void

resolve

  • resolve(msg: unknown): void
  • Resolve a request. This should be invoked for the successful processing of this request. This doesn't necessarily mean that the request was sent through, e.g. suppressing AS virtual users' messages is still a success.

    Parameters

    • msg: unknown

      The thing to resolve with.

    Returns void

Generated using TypeDoc