import type { Locator } from "vitest/browser"; /** * Safely gets an element from a Locator and executes a callback if it matches the expected type. * @param locator - The vitest Locator * @param type - The expected element constructor (e.g., HTMLButtonElement) * @param callback - Function to execute with the typed element */ export declare function withElement(locator: Locator, type: new (...args: any[]) => T, callback: (element: T) => void): void; /** * Focuses an element from a Locator if it's an HTMLElement. * Common shorthand for the most frequent use case. */ export declare function focusElement(locator: Locator): void; /** * Safely focuses a raw element if it's an HTMLElement. * @param element - The element to focus (can be undefined/null) */ export declare function focusRawElement(element: Element | null | undefined): void; /** * Safely gets the value from an input element, returns empty string if not an input. * @param locator - The vitest Locator * @returns The input value or empty string */ export declare function getInputValue(locator: Locator): string;