/** * @file * * Mock of Obsidian's `BooleanValue`, the Bases value wrapping a boolean. */ import type { BooleanValue as BooleanValueOriginal } from 'obsidian'; import type { RenderContext } from './RenderContext.cjs'; import { PrimitiveValue } from './PrimitiveValue.cjs'; /** * Mock of Obsidian's `BooleanValue`, a Bases `Value` wrapping a boolean. */ export declare class BooleanValue extends PrimitiveValue { /** * The value type's identifier, `'Boolean'` - Obsidian's own name for this class of value. */ static type: string; /** * The lucide icon name standing for this value's type. */ icon: string; /** * Creates a value wrapping a boolean. * * @param value - The wrapped boolean; `false` when omitted. */ constructor(value?: boolean); /** * Mock-only factory: creates a boolean value, spyable via `vi.spyOn(BooleanValue, 'create__')`. * * @param value - The wrapped boolean; `false` when omitted. * @returns The new boolean value. */ static create__(value?: boolean): BooleanValue; /** * Mock-only: views a value typed as Obsidian's `BooleanValue` as this mock. Numbered to avoid clashing with the * variants its base classes declare. * * @param value - The value typed as the original `BooleanValue`. * @returns The same object, typed as the mock. */ static fromOriginalType4__(value: BooleanValueOriginal): BooleanValue; /** * Mock-only: views this mock as Obsidian's `BooleanValue` type. Numbered to avoid clashing with the variants its * base classes declare. * * @returns The same object, typed as the original `BooleanValue`. */ asOriginalType4__(): BooleanValueOriginal; /** * Mock-only construction hook, called at the end of the constructor; a no-op meant for * `vi.spyOn(BooleanValue.prototype, 'constructor4__')`. * * @param _value - The boolean the value was created with. */ constructor4__(_value?: boolean): void; /** * Renders the value into an element, as Obsidian does: a DISABLED checkbox whose `checked` is the wrapped * boolean, rather than the text `true` or `false` its base would write. * * Obsidian sets `checked` as a PROPERTY after creating the input, not as an attribute, so the rendered * element's `checked` attribute is absent either way and only `inputEl.checked` answers - which is what a * consumer asserting on it has to read. * * @param el - The element to render into. * @param _context - The rendering context; unused. */ renderTo(el: HTMLElement, _context: RenderContext): void; }