/// import type { Subscription } from './Connect.js'; export declare enum State { ACTIVE = "active", INACTIVE = "inactive" } type ActiveEvent = CustomEvent<{ active: boolean; }>; interface EventMap { 'state-changed': ActiveEvent; } type ListenerType = ((this: FluxConnection, ev: EventMap[T]) => any) | { handleEvent(ev: EventMap[T]): void; } | null; /** * A representation of the underlying persistent network connection used for subscribing to Flux type endpoint methods. */ export declare class FluxConnection extends EventTarget { #private; state: State; constructor(connectPrefix: string, atmosphereOptions?: Partial); /** * Subscribes to the flux returned by the given endpoint name + method name using the given parameters. * * @param endpointName - the endpoint to connect to * @param methodName - the method in the endpoint to connect to * @param parameters - the parameters to use * @returns a subscription */ subscribe(endpointName: string, methodName: string, parameters?: unknown[]): Subscription; } export interface FluxConnection { addEventListener(type: T, listener: ListenerType): void; removeEventListener(type: T, listener: ListenerType): void; } export {}; //# sourceMappingURL=FluxConnection.d.ts.map