export type PollingState<T> = {
    tag: 'idle';
    result: null;
    error: null;
} | {
    tag: 'polling';
    result: T | null;
    error: Error | null;
} | {
    tag: 'completed';
    result: T;
    error: null;
} | {
    tag: 'failed';
    result: T;
    error: null;
} | {
    tag: 'timeout';
    result: T | null;
    error: Error;
};
export type PollingAction<T> = {
    type: 'polling-went-idle';
} | {
    type: 'polling-reset';
} | {
    type: 'polling-progressed';
    result: T;
} | {
    type: 'polling-completed';
    result: T;
} | {
    type: 'polling-failed';
    result: T;
} | {
    type: 'polling-request-failed';
    error: Error;
} | {
    type: 'polling-timed-out';
};
export declare function createInitialPollingState<T>(): PollingState<T>;
export declare function pollingReducer<T>(state: PollingState<T>, action: PollingAction<T>): PollingState<T>;
