import type { MatesRef } from "../Mutables/ref/ref"; type AnyEventName = keyof HTMLElementEventMap; export type OnParentMap = { [K in AnyEventName]?: (event: HTMLElementEventMap[K]) => void; }; /** * Attaches event listeners to a parent (or any ancestor) element via a * `MatesRef`, scoped to the lifetime of the element the directive is on. * * - Listeners are bound as soon as the ref's element becomes available. * - If the host element disconnects, all listeners are removed automatically. * - Handler identity changes are handled via ref-swap — no rebind overhead. * * @example * ```ts * import { ref, setRef, onParent } from "mates"; * * const listRef = ref(); * * html` * * `; * ``` */ export declare function onParent(target: MatesRef, events: OnParentMap): import("lit-html/directive").DirectiveResult; export {}; //# sourceMappingURL=onParentDirective.d.ts.map