import { Target } from '../types'; export interface WindowEventHandler { (this: Window, e: WindowEventMap[T]): any; } export interface DocumentEventHandler { (this: Document, e: DocumentEventMap[T]): any; } export declare type HandlerOptions = boolean | AddEventListenerOptions; export declare type DocumentEvents = keyof DocumentEventMap; export declare type WindowEvents = keyof WindowEventMap; export interface IEventTarget { readonly value: EventTarget | null; } export declare type IEventResult = [IEventTarget, () => void]; export declare function useEvent(event: T, handler: WindowEventHandler, options?: HandlerOptions): IEventResult; export declare function useEvent(event: T, handler: DocumentEventHandler, options?: HandlerOptions, target?: Target): IEventResult; export declare function useEvent(event: T, handler: DocumentEventHandler, options?: HandlerOptions, target?: string): IEventResult;