import { DestroyRef, Injector, Signal } from '@angular/core'; export type OnEventOptions = { once?: boolean; capture?: boolean; passive?: boolean; } & ({ destroyRef?: DestroyRef; injector?: never; manualCleanup?: false | null | undefined; } | { destroyRef?: never; injector?: Injector; manualCleanup?: false | null | undefined; } | { destroyRef?: never; injector?: never; manualCleanup?: true; }); /** Result of the `onEvent()` function. Contains the `destroy()` function to remove the listener and the `active` signal to check if the listener is still active.*/ export type OnEventRef = { destroy: () => void; active: Signal; }; export declare function onEvent(target: EventTarget, eventKey: K, listener: (event: E, abort: () => void) => void, options?: OnEventOptions): OnEventRef; export declare function onEvent(target: EventTarget, eventKey: string, listener: (event: E, abort: () => void) => void, options?: OnEventOptions): OnEventRef;