import type { Readable } from 'svelte/store'; import type { ChannelErrorData, ConnectionStatus, Options } from 'datocms-listen'; declare type Maybe = T | null; export declare type SubscribeToQueryOptions = Omit, 'onStatusChange' | 'onUpdate' | 'onChannelError'>; export declare type EnabledQueryListenerOptions = { /** Whether the subscription has to be performed or not */ enabled?: true; /** The initial data to use while the initial request is being performed */ initialData?: QueryResult; } & SubscribeToQueryOptions; export declare type DisabledQueryListenerOptions = { /** Whether the subscription has to be performed or not */ enabled: false; /** The initial data to use while the initial request is being performed */ initialData?: QueryResult; } & Partial>; export declare type QueryListenerOptions = EnabledQueryListenerOptions | DisabledQueryListenerOptions; export declare type QuerySubscriptionState = { error: Maybe; data: Maybe; status: ConnectionStatus; }; export declare function useQuerySubscription>(options: QueryListenerOptions): Readable>; export {};