import type { Cleanup, SignalOptions } from './types.ts'; interface ObserveOptions extends SignalOptions { root?: Element; } /** * Auto-bind behaviors to elements matching a CSS selector, both existing * and dynamically added in the future via MutationObserver. * * Returns a cleanup function that disconnects the observer and runs all * per-element cleanups returned by the handler. * * @example * * const stop = observe('[data-tooltip]', (el) => { * const tip = new Tooltip(el); * return () => tip.destroy(); * }); * * stop(); // disconnects observer + destroys all tooltips */ export declare function observe(selector: string, handler: (el: Element) => Cleanup | void, opts?: ObserveOptions): Cleanup; export {};