InterfaceISubContext<T>

Subscription Context Interface, as used with IEventOptions.onSubscribe and IEventOptions.onCancel notification options that can be set during SubEvent construction.

interface ISubContext<T> {
    data?: any;
    event: SubEvent<T>;
    name?: string;
}

Type Parameters

  • T = unknown

Properties

Properties

data?: any

Unknown-type data to let event wrappers persist any context they need within the event's lifecycle.

event: SubEvent<T>

Event object that provides the context.

name?: string

Subscription name, if one was specified with method SubEvent.subscribe.