/** * @file * * Mock of Obsidian's `MarkdownRenderChild`, a component whose lifetime is tied to a rendered Markdown element. */ import type { MarkdownRenderChild as MarkdownRenderChildOriginal } from 'obsidian'; import { Component } from './Component.cjs'; /** * Mock of Obsidian's `MarkdownRenderChild`. * * Obsidian unloads the child once its container is detached from the preview; the mock never watches the element, * so the child stays loaded until it is unloaded explicitly. */ export declare class MarkdownRenderChild extends Component { /** * The element whose presence in the preview keeps this child alive. */ containerEl: HTMLElement; /** * Creates a render child for an element. * * @param containerEl - The element tying the child's lifetime to the rendered Markdown; it should be a child of * the preview sections. */ constructor(containerEl: HTMLElement); /** * Mock-only factory: creates a render child, spyable via `vi.spyOn(MarkdownRenderChild, 'create2__')`. The * subclass variant of {@link Component.create__}. * * @param containerEl - The element tying the child's lifetime to the rendered Markdown. * @returns The new render child. */ static create2__(containerEl: HTMLElement): MarkdownRenderChild; /** * Mock-only: views a value typed as Obsidian's `MarkdownRenderChild` as this mock. * * @param value - The value typed as the original `MarkdownRenderChild`. * @returns The same object, typed as the mock. */ static fromOriginalType2__(value: MarkdownRenderChildOriginal): MarkdownRenderChild; /** * Mock-only: views this mock as Obsidian's `MarkdownRenderChild` type. * * @returns The same object, typed as the original `MarkdownRenderChild`. */ asOriginalType2__(): MarkdownRenderChildOriginal; /** * Mock-only construction hook, called at the end of the constructor; a no-op meant for * `vi.spyOn(MarkdownRenderChild.prototype, 'constructor2__')`. * * @param _containerEl - The container element the child was created with. */ constructor2__(_containerEl: HTMLElement): void; }