type EventSourceConstructor = {
    new (url: string, eventSourceInitDict?: EventSourceInit): EventSource;
};
export type EventSourceStatus = "init" | "open" | "closed" | "error";
export type EventSourceEvent = Event & {
    data: string;
};
export declare function useEventSource(url: string, withCredentials?: boolean, ESClass?: EventSourceConstructor): readonly [EventSource | null, EventSourceStatus];
export declare function useEventSourceListener(source: EventSource | null, types: string[], listener: (e: EventSourceEvent) => void, dependencies?: any[]): void;
export {};
