Skip to content

SubscribeEventParams<Source, EventName>

Parameters for subscribeEvent.

Import:

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

Signature:

export interface SubscribeEventParams<Source extends Events, EventName extends EventNameOf<Source>>

Properties

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

Links to this page: