import { Observable } from 'rxjs'; import { Action } from 'redux-toolbelt'; import { Epic } from 'redux-observable'; /** * Reacts to actions by suffix, and dispaches another action * * @template I The type of actions that will be passed to the epic * * @template O The type of actions the epic will return * * @template S The type of state to expect * * @param {makeSuffixesEpic.mapper} mapper * A mapper function that returns an action. The function takes 3 parameters: * - action - The current action the epic handles * - state$ - An observable containing the current state * - dependencies - Optional additional dependencies * * @param {string[] | string} suffixes * An array of prefixes or a single prefix * * @param {(meta:I['meta']) => boolean} metaPredicate * Another filtering option for the incoming actions on the stream, allows to * filter by content of action meta field * * @returns {Epic} An Epic */ export declare function makeSuffixesEpic( mapper: makeSuffixesEpic.mapper, suffixes: string[] | string, metaPredicate: (meta: I['meta']) => boolean ): Epic export declare namespace makeSuffixesEpic { export type mapper = ( action: I, state$: Observable, dependencies?: any ) => O }