Skip to content

SettingsMigrationApi<TMigratableSettings>

The API a plugin publishes when it is willing to receive settings another plugin used to own.

The provider owns the settings, so it owns the dialog: a proposing plugin never writes into another plugin’s data.json. It proposes, and the user approves, edits or declines.

Import:

import type { SettingsMigrationApi } from 'obsidian-dev-utils/obsidian/plugin/settings-migration-api';

Signature:

export interface SettingsMigrationApi<TMigratableSettings extends object>

Methods

MethodReturnsDescription
migrateSettings(params)Promise<MigrateSettingsResult>Offers the user a set of settings values another plugin proposes, and applies what they approve.

Resolves only once the dialog is closed, so the caller learns whether the migration actually happened and can retire — or withhold — its own pending values on that answer.