/** * Directive teardown/cleanup registry. * * Stores cleanup functions returned by directives and runs them * when elements are removed from the DOM. * * @packageDocumentation */ export type CleanupFn = () => void; /** * Register a cleanup function for an element. * * @param el - The element to associate the cleanup with * @param fn - The cleanup function to run when the element is removed */ export declare function registerCleanup(el: Element, fn: CleanupFn): void; /** * Run and clear all cleanup functions for an element. * * @param el - The element whose cleanups should be run */ export declare function runCleanups(el: Element): void; /** * Run cleanups for an element and all its descendants. * * @param el - The root element */ export declare function runCleanupsRecursive(el: Element): void; /** * Reset the cleanup registry. For testing only. */ export declare function clearCleanupMap(): void;