/** * @file * * Mock of Obsidian's `MenuSeparator`, the divider between groups of menu items. */ import type { MenuSeparator as MenuSeparatorOriginal } from 'obsidian'; import type { Menu } from './Menu.cjs'; /** * Mock of Obsidian's `MenuSeparator`. It has no state of its own; it only marks a position in `Menu.items`. */ export declare class MenuSeparator { /** * Creates a separator for a menu. Use {@link MenuSeparator.create__} from tests. * * @param menu - The menu the separator belongs to; not stored by the mock. */ protected constructor(menu: Menu); /** * Mock-only factory: creates a menu separator, spyable via `vi.spyOn(MenuSeparator, 'create__')`. * * @param menu - The menu the separator belongs to. * @returns The new menu separator. */ static create__(menu: Menu): MenuSeparator; /** * Mock-only: views a value typed as Obsidian's `MenuSeparator` as this mock. * * @param value - The value typed as the original `MenuSeparator`. * @returns The same object, typed as the mock. */ static fromOriginalType__(value: MenuSeparatorOriginal): MenuSeparator; /** * Mock-only: views this mock as Obsidian's `MenuSeparator` type. * * @returns The same object, typed as the original `MenuSeparator`. */ asOriginalType__(): MenuSeparatorOriginal; /** * Mock-only construction hook, called at the end of the constructor; a no-op meant for * `vi.spyOn(MenuSeparator.prototype, 'constructor__')`. * * @param _menu - The menu the separator was created with. */ constructor__(_menu: Menu): void; }