gotty/js/dist/waitFor.d.ts

10 lines
429 B
TypeScript
Raw Normal View History

2025-10-25 11:35:34 -05:00
/**
* Waits for a DOM element matching the selector to exist in the document.
* Resolves immediately if it already exists.
*
* @param selector CSS selector for the element to wait for
* @param timeout Optional timeout in milliseconds (default: no timeout)
* @returns Promise that resolves with the found element
*/
export declare function waitForElement<T extends Element>(selector: string, timeout?: number): Promise<T>;