import { Action } from 'redux'; import { ActionsObservable, Epic, StateObservable } from 'redux-observable'; import { Observable } from 'rxjs'; import { ErrorContext } from './error-context'; import { IEpicFactory } from './managers'; /** * Function type that handles errors in the ISupervisionOptions. Invoked * with the error that occurred and an error output stream. If an observable * is returned, we'll wait for that before restarting epics, if appropriate. */ export declare type ErrorHandler = (error: ErrorContext, actions: ActionsObservable, state: StateObservable, services: Services) => Observable | void; /** * Options passed to `superviseEpics`. */ export interface ISupervisionOptions { restart: IEpicFactory; onError: ErrorHandler; onRestart: ErrorHandler; } /** * A combineEpics-esque function which supports configurably restarting * on errors. See the @mixer/epic-supervisor readme for more documentation. */ export declare const superviseEpics: = any, Output extends Input = Input, State = any, Dependencies = any>({ restart, onError, onRestart, }: Partial>, ...epics: Epic[]) => Epic; /** * A combineEpics-compatible function. */ export declare const combineEpics: >(...epics: T[]) => T;