Skip to content

PluginApiMethodContract

The payload schemas for a single API method. Both halves are optional: a method may declare only its input, only its output, neither (the entry then just declares that the method must exist), or both.

Import:

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

Signature:

export interface PluginApiMethodContract

Properties

PropertyTypeDescription
input?StandardSchemaV1Validates the method's arguments, as an array.
output?StandardSchemaV1Validates the method's return value — or, when the method returns a thenable, the value it resolves to.

Links to this page: