/** * @file * * Mock of Obsidian's `RegExpValue`, the Bases value wrapping a regular expression. */ import type { RegExpValue as RegExpValueOriginal } from 'obsidian'; import { NotNullValue } from './NotNullValue.cjs'; /** * Mock of Obsidian's `RegExpValue`, a Bases value wrapping a regular expression. */ export declare class RegExpValue extends NotNullValue { /** * The value type's identifier, `'RegExp'` - Obsidian's own name for this class of value. */ static type: string; /** * The lucide icon name standing for this value's type. */ icon: string; /** * The wrapped regular expression. Obsidian's own name for it, which is why it carries no `__` suffix (L4). */ regexp: RegExp; /** * Creates a value wrapping `regexp`. * * @param regexp - The regular expression to wrap. */ constructor(regexp: RegExp); /** * Mock-only factory: creates a regular expression value, spyable via `vi.spyOn(RegExpValue, 'create__')`. * * @param regexp - The regular expression to wrap. * @returns The new regular expression value. */ static create__(regexp: RegExp): RegExpValue; /** * Mock-only: views a value typed as Obsidian's `RegExpValue` as this mock. * * @param value - The value typed as the original `RegExpValue`. * @returns The same object, typed as the mock. */ static fromOriginalType3__(value: RegExpValueOriginal): RegExpValue; /** * Mock-only: views this mock as Obsidian's `RegExpValue` type. * * @returns The same object, typed as the original `RegExpValue`. */ asOriginalType3__(): RegExpValueOriginal; /** * Mock-only construction hook, called at the end of the constructor; a no-op meant for * `vi.spyOn(RegExpValue.prototype, 'constructor3__')`. * * @param _regexp - The regular expression the value was created with. */ constructor3__(_regexp: RegExp): void; /** * Reports whether the value counts as true in a condition; a regular expression always does. * * @returns Always `true`. */ isTruthy(): boolean; /** * Converts the value to its display string: the wrapped pattern's own `toString()`, as Obsidian does. * * @returns The wrapped regular expression's string form, such as `/abc/gi`. */ toString(): string; }