Skip to content

RequirePluginParams<TPlugin>

Parameters for requirePlugin.

Import:

import type { RequirePluginParams } from '@mnaoumov/obsidian-lib/plugin/plugin-instance';

Signature:

export interface RequirePluginParams<TPlugin extends Plugin = Plugin> extends GetPluginAvailabilityParams<TPlugin>

Extends: GetPluginAvailabilityParams<TPlugin>

Properties

PropertyTypeDescription
abortSignal?AbortSignalEnds the wait early; the promise rejects with the signal's reason.
appAppThe Obsidian app instance.
(Inherited from GetPluginAvailabilityParams)
componentComponentThe component owning the wait and its notice. Its unload ends both, rejecting the promise.
isPlugin?(plugin: Plugin) => plugin is TPluginVerifies that the running instance is the shape the caller uses. Without it, TPlugin is an assertion nothing checks.
(Inherited from GetPluginAvailabilityParams)
minPluginVersion?stringThe oldest release of the plugin the caller works with, compared with its manifest.version. This is a plugin RELEASE, never an API contract version: a provider publishing a versioned contract is reached through watchPluginApi's apiVersionRange instead.
(Inherited from GetPluginAvailabilityParams)
pluginIdstringThe manifest.id of the plugin.
(Inherited from GetPluginAvailabilityParams)
pluginNamestringThe display name of the required plugin, shown to the user.
pluginNoticeComponentPluginNoticeComponentThe asking plugin's notice component, which shows what is missing and the button that fixes it.
requestingPluginNamestringThe display name of the asking plugin, named in the notice.
timeoutInMilliseconds?numberHow long to wait before giving up. By default the wait lasts until the user repairs the plugin, the RequirePluginParams.abortSignal aborts or the RequirePluginParams.component unloads.

Links to this page: