On This Page

EventWaitError

Class in Errors · JavaScript & TypeScript

A filtered event wait ended without a match or could not use its synchronous filter

A filter throw keeps the thrown value as cause. A non-boolean return is not retained

class EventWaitError extends FluxerlyErrorclass EventWaitError
  extends FluxerlyError

Constructor#

new EventWaitError(
    reason: "filter" | "timeout",
    options?: { readonly cause?: unknown }
): EventWaitErrornew EventWaitError(
  reason: "filter" | "timeout",
  options?: {
    readonly cause?: unknown
  }
): EventWaitError

Parameters

reason

The reason timeout means no matching event was observed before the local deadline

The reason filter means the callback threw or failed to return a boolean synchronously, and a thrown value is the error's cause

"filter" | "timeout"
options optional

Optional underlying failure, such as the value thrown by the filter

{ readonly cause?: unknown }

Properties#

_tag#

Stable discriminator for a local timeout or synchronous filter failure

readonly _tag: "EventWaitError"

reason#

The reason timeout means no matching event was observed before the local deadline

The reason filter means the callback threw or failed to return a boolean synchronously, and a thrown value is the error's cause

readonly reason: "filter" | "timeout"readonly reason:
  | "filter" | "timeout"

Inherited#

Inherited from FluxerlyError: code, details, hint, toJSON