import { Action } from 'redux'; import { ActionsObservable, Epic, StateObservable } from 'redux-observable'; import { Subscriber } from 'rxjs'; export interface IEpicManager { /** * Boots the manager. */ connect(): void; /** * Emits the given error to the output stream. */ error(err: Error): void; /** * Unsubscribes from all source epics. */ close(): void; /** * Indicates a fault happened on the given epic index. Should disconnect it. */ fault(index: number): void; /** * Restarts a previously faulted epic. */ restart(index: number): void; } /** * Options passed to IEpicFactory instance. */ export interface IFactoryOptions { subscriber: Subscriber; epics: ReadonlyArray>; onError: (error: Error, index: number) => void; actions: ActionsObservable; state: StateObservable; services: Dependencies; } /** * Type that creates an epic manager. */ export declare type IEpicFactory = (options: IFactoryOptions) => IEpicManager; /** * Restart policy that does not restart any epics. */ export declare const noRestarts: IEpicFactory; /** * Restart policy that restarts a single epic if it fails. */ export declare const oneForOne: IEpicFactory; /** * Restart policy that restarts all epics if one fails. */ export declare const oneForAll: IEpicFactory; /** * Restart policy that restarts all subsequent epics if one fails. */ export declare const restForOne: IEpicFactory;