Amazon Vinyl
    Preparing search index...

    Interface NextEventAsPromiseOptions<EventMap, K>

    interface NextEventAsPromiseOptions<EventMap, K extends keyof EventMap> {
        abort?: Maybe<ReadonlyAbort>;
        filter?: ((event: EventMap[K]) => boolean) | null;
        timeout?: number;
        timeoutLevel?: ErrorLevel;
        timeoutMessage?: string;
        timeoutOrigin?: string;
    }

    Type Parameters

    Index

    (Optional) If provided, will reject the promise if the signal is aborted.

    filter?: ((event: EventMap[K]) => boolean) | null

    (Optional) If provided, will only resolve if the event passes this predicate.

    timeout?: number

    If provided, the promise will reject after this duration, in seconds, if not resolved.

    timeoutLevel?: ErrorLevel

    The error level on a timeout.

    timeoutMessage?: string

    The timeout message. If not provided will use DEFAULT_TIMEOUT_MESSAGE.

    timeoutOrigin?: string

    The error origin if the next event times out. Default: ErrorOrigin.INTERNAL