/** * This file is inspired by Reach's `observeRect` * I just copied the code and made some modifications to make it work with TypeScript and our codebase * * @see https://github.com/reach/observe-rect */ export type RectProps = { rect: DOMRect | undefined; callbacks: ((domRect: DOMRect | undefined) => void)[]; }; /** * Observe the rect of the given node and run the callback when the rect changes * * @param node - The node to observe * * @param callback - The callback to run when the rect changes */ export declare function observeRect(node: Element, callback: (rect: DOMRect | undefined) => void): { observe(): void; unobserve(): void; };