import type { ActionOf, ActionSpecifier, AnyAction, AnyActionSpecifier, TypeGuard } from '../action-bus'; import type { NonEmptyArray } from '../internal/util/functional/non-empty-array.types'; import type { ActionReducer, AnyActionReducer, SourcesList, StateReducer } from './store.types'; /** * Combines action reducers by calling each of them in succession * * @param reducers Reducers to combine * @return Action reducer that combines all effects */ export declare const combineActionReducers: (...reducers: AnyActionReducer[]) => AnyActionReducer; /** * Makes it easier to build reducers by filtering actions first, narrowing their type. * If the type matches it then calls the given reducer * * @param filter A function that filters the action down to the desired actions. * @param reducer A reducer that operates on the desired action. * @return A reducer that operates on any action. */ export declare const on: >(filter: TypeGuard, DesiredActionType>, reducer: ActionReducer) => AnyActionReducer; /** * Filters actions based on the desired source. Actions that do no have a source will fail * this filter. * * @param sources The list of acceptable sources that you want to filter for. * @return True if the action has an acceptable source: false if otherwise. * @deprecated */ export declare const requireSource: (...sources: Array) => >(action: ActionType) => action is ActionType; /** * Filters actions based on the desired source. Actions that do no have a source will pass * this filter. * * @param sources The list of acceptable sources that you want to filter for. * @return True if the action has an acceptable source or no source: false if otherwise. * @deprecated */ export declare const optionalSource: (...sources: Array) => >(action: ActionType) => action is ActionType; /** * Filters actions by the desired type * * @param actionTypes The desired action types. * @return True if the type is one of the desired action types: false if otherwise. */ export declare const isType: >(...actionTypes: NonEmptyArray) => (action: ActionSpecifier) => action is ActionType; /** * Filters actions by the desired subtype * * @param actionSubtypes The desired action subtypes. * @return True if the subtype is one of the desired action types: false if otherwise. */ export declare const isSubtype: >(...actionSubtypes: NonEmptyArray) => (action: AnyAction) => action is ActionType; /** * Type guard that tells you whether an action matches a given action specifier. * * @param specifier Action specifier to match * @param extraSources Possible extra values of the source field that are allowed. (Deprecated) * @return True if the action matches the specifier: false if not. */ export declare const matches: (specifier: DesiredActionSpecifierType, extraSources?: SourcesList) => TypeGuard, ActionOf>; /** * Combines two type guards such that an action must comply with both. * * @param outerTypeguard First type guard to be called. * @param innerTypeguard Second type guard to be called if the outer returns true. * @return True if the action matches both specifiers: false if not. */ export declare const and: = AnyAction>(outerTypeguard: TypeGuard, innerTypeguard: TypeGuard) => TypeGuard; /** * Combines two type guards such that an action must comply with either. * * @param typeguardA First type guard to be called. * @param typeguardB Second type guard to be called if the first returns false. * @return True if the action matches either specifiers: false if not. */ export declare const or: = AnyAction>(typeguardA: TypeGuard, typeguardB: TypeGuard) => TypeGuard; /** * Combines two state reducers calling the inner and then the outer. * * @param outerReducer The state reducer * @return A function that takes another reducer and returns the combined state reducer. */ export declare const composeStateReducers: (outerReducer: StateReducer) => (innerReducer: StateReducer) => StateReducer;