Skip to content

triggerPluginLifecycleEvent

Triggers one of the two lifecycle events on the app’s workspace.

A thin typed wrapper over Workspace.trigger, which accepts any event name and any arguments, so that the one place a payload is constructed is checked against PluginLifecycleEventPayload.

Import:

import { triggerPluginLifecycleEvent } from 'obsidian-dev-utils/obsidian/plugin/plugin-lifecycle-events';

Signature:

function triggerPluginLifecycleEvent(params: TriggerPluginLifecycleEventParams): void

Parameters:

ParameterTypeDescription
paramsTriggerPluginLifecycleEventParamsThe TriggerPluginLifecycleEventParams.

Returns: void


Links to this page: