Type Parameters

  • T

Constructors

  • Construct a new Request.

    Type Parameters

    • T

    Parameters

    Returns Request<T>

Accessors

  • get isPending(): boolean
  • Returns boolean

Methods

  • Get any optional data set on this request.

    Returns T

    The data

  • Get the number of elapsed milliseconds since this request was created.

    Returns number

    The number of milliseconds since this request was made.

  • Get this request's ID.

    Returns string

    The ID.

  • 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

  • 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 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 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