/** * @file * * Mock of Obsidian's `TAbstractFile`, the common base of vault files and folders. */ import type { TAbstractFile as TAbstractFileOriginal } from 'obsidian'; import type { TFolder } from './TFolder.cjs'; import type { Vault } from './Vault.cjs'; /** * Mock of Obsidian's `TAbstractFile` base class: a vault entry identified by its path. */ export declare abstract class TAbstractFile { /** * Whether the entry has been deleted from the vault. */ deleted: boolean; /** * The entry's name: the last segment of its path, including any extension. */ name: string; /** * The folder containing the entry, or `null` for the root or an entry not yet attached. */ parent: null | TFolder; /** * The entry's vault-relative path. */ path: string; /** * The vault the entry belongs to. */ vault: Vault; /** * Creates an entry and derives its name from the path. * * @param vault - The vault the entry belongs to. * @param path - The entry's vault-relative path. */ protected constructor(vault: Vault, path: string); /** * Mock-only: views a value typed as Obsidian's `TAbstractFile` as this mock. * * @param value - The value typed as the original `TAbstractFile`. * @returns The same object, typed as the mock. */ static fromOriginalType__(value: TAbstractFileOriginal): TAbstractFile; /** * Mock-only: views this mock as Obsidian's `TAbstractFile` type. * * @returns The same object, typed as the original `TAbstractFile`. */ asOriginalType__(): TAbstractFileOriginal; /** * Mock-only construction hook, called at the end of the constructor; a no-op meant for * `vi.spyOn(TAbstractFile.prototype, 'constructor__')`. * * @param _vault - The vault the entry was created with. * @param _path - The path the entry was created with. */ constructor__(_vault: Vault, _path: string): void; }