/** * @file * * Mock of Obsidian's `PluginSettingTab`, the settings tab a plugin registers. */ import type { PluginSettingTab as PluginSettingTabOriginal } from 'obsidian'; import type { App } from './App.cjs'; import type { Plugin } from './Plugin.cjs'; import { SettingTab } from './SettingTab.cjs'; /** * Mock of Obsidian's `PluginSettingTab`, which gives users a unified interface to configure a plugin. */ export declare abstract class PluginSettingTab extends SettingTab { /** * Mock-only: the plugin the tab was created for. */ plugin__: Plugin; /** * Creates a settings tab for `plugin`. * * @param app - The app instance. * @param plugin - The plugin the tab configures. */ constructor(app: App, plugin: Plugin); /** * Mock-only: views a value typed as Obsidian's `PluginSettingTab` as this mock. * * @param value - The value typed as the original `PluginSettingTab`. * @returns The same object, typed as the mock. */ static fromOriginalType2__(value: PluginSettingTabOriginal): PluginSettingTab; /** * Mock-only: views this mock as Obsidian's `PluginSettingTab` type. * * @returns The same object, typed as the original `PluginSettingTab`. */ asOriginalType2__(): PluginSettingTabOriginal; /** * Mock-only construction hook, called at the end of the constructor; a no-op meant for * `vi.spyOn(PluginSettingTab.prototype, 'constructor2__')`. * * @param _app - The app the tab was created with. * @param _plugin - The plugin the tab was created with. */ constructor2__(_app: App, _plugin: Plugin): void; }