import type { DependencyList, RefObject } from 'react';
type EventMapForTarget<Target extends EventTarget> = Target extends HTMLElement ? HTMLElementEventMap : Target extends SVGElement ? SVGElementEventMap : Target extends Document ? DocumentEventMap : Target extends Window ? WindowEventMap : {
    [eventType: string]: Event;
};
type EventNamesForTarget<T extends EventTarget> = keyof EventMapForTarget<T> & string;
/**
 * @example useEvent('keydown', (event) => { do something });
 * @param cb The function that should be executed on keydown keyevent.
 * @param options
 */
declare function useEvent<Target extends Document, EventName extends EventNamesForTarget<Target>>(eventName: EventName, cb: (e: EventMapForTarget<Target>[EventName]) => void, opts?: {
    target?: undefined;
    eventOptions?: AddEventListenerOptions | boolean;
    dependencies: DependencyList;
}): void;
declare function useEvent<Target extends EventTarget, EventName extends EventNamesForTarget<Target>>(eventName: EventName, cb: (e: EventMapForTarget<Target>[EventName]) => void, opts: {
    target: Target | RefObject<Target> | null;
    eventOptions?: AddEventListenerOptions | boolean;
    dependencies?: DependencyList;
}): void;
declare function useEvent<Target extends EventTarget, EventName extends EventNamesForTarget<Target | Document>>(eventName: EventName, cb: (e: EventMapForTarget<Target | Document>[EventName]) => void, opts: {
    target?: Target | RefObject<Target> | null | undefined;
    eventOptions?: AddEventListenerOptions | boolean;
    dependencies?: DependencyList;
}): void;
declare function useEvent(eventName: string, cb: (e: Event) => void, opts?: {
    target?: EventTarget | RefObject<EventTarget> | null | undefined;
    eventOptions?: AddEventListenerOptions | boolean;
    dependencies?: DependencyList;
}): void;
export default useEvent;
//# sourceMappingURL=useEvent.d.ts.map