WatchPluginApiParams
Parameters for watchPluginApi.
Import:
import type { WatchPluginApiParams } from 'obsidian-dev-utils/obsidian/plugin/plugin-api';Signature:
export interface WatchPluginApiParamsProperties
| Property | Type | Description |
|---|---|---|
| apiVersionRange | string | The semver range of contract versions the consumer compiled against, e.g. '^2'. The highest published version satisfying it wins. |
| app | App | The Obsidian app instance, used to classify a failure as not-installed vs not-enabled. |
| component | Component | The component owning the subscription. The watch is torn down when it unloads. |
| contract? | PluginApiContract | The 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. |
| pluginId | string | The manifest.id of the providing plugin. |
Links to this page: