Skip to content

WatchPluginApiParams

Parameters for watchPluginApi.

Import:

import type { WatchPluginApiParams } from 'obsidian-dev-utils/obsidian/plugin/plugin-api';

Signature:

export interface WatchPluginApiParams

Properties

PropertyTypeDescription
apiVersionRangestringThe semver range of contract versions the consumer compiled against, e.g. '^2'. The highest published version satisfying it wins.
appAppThe Obsidian app instance, used to classify a failure as not-installed vs not-enabled.
componentComponentThe component owning the subscription. The watch is torn down when it unloads.
contract?PluginApiContractThe contract the CONSUMER expects. Optional, and it wins over the provider's published contract when supplied — it is the consumer's own compiled-against expectation, so it is the one whose violation is the consumer's problem.
pluginIdstringThe manifest.id of the providing plugin.

Links to this page: