Skip to content

SubscribeAsyncDisposableEventParams<Source, EventName>

Parameters for subscribeAsyncDisposableEvent.

Import:

import type { SubscribeAsyncDisposableEventParams } from 'obsidian-dev-utils/async-events';

Signature:

export interface SubscribeAsyncDisposableEventParams<Source extends GenericAsyncEventSource, EventName extends AsyncEventNameOf<Source>>

Properties

PropertyTypeDescription
asyncEventSourceSourceThe async event source to subscribe on.
callbackAsyncEventCallbackOf<Source, EventName>The event callback. Its argument types are inferred from SubscribeAsyncDisposableEventParams.name.
nameEventNameThe event name to subscribe to.
thisArg?unknownThe context passed as this to the callback.

Links to this page: