import { Action, PreloadedState, Reducer, Store, StoreEnhancer } from 'redux'; export declare const ActionTypes: { readonly PERFORM_ACTION: "PERFORM_ACTION"; readonly RESET: "RESET"; readonly ROLLBACK: "ROLLBACK"; readonly COMMIT: "COMMIT"; readonly SWEEP: "SWEEP"; readonly TOGGLE_ACTION: "TOGGLE_ACTION"; readonly SET_ACTIONS_ACTIVE: "SET_ACTIONS_ACTIVE"; readonly JUMP_TO_STATE: "JUMP_TO_STATE"; readonly JUMP_TO_ACTION: "JUMP_TO_ACTION"; readonly REORDER_ACTION: "REORDER_ACTION"; readonly IMPORT_STATE: "IMPORT_STATE"; readonly LOCK_CHANGES: "LOCK_CHANGES"; readonly PAUSE_RECORDING: "PAUSE_RECORDING"; }; export interface PerformAction> { type: typeof ActionTypes.PERFORM_ACTION; action: A; timestamp: number; stack: string | undefined; } interface ResetAction { type: typeof ActionTypes.RESET; timestamp: number; } interface RollbackAction { type: typeof ActionTypes.ROLLBACK; timestamp: number; } interface CommitAction { type: typeof ActionTypes.COMMIT; timestamp: number; } interface SweepAction { type: typeof ActionTypes.SWEEP; } interface ToggleAction { type: typeof ActionTypes.TOGGLE_ACTION; id: number; } interface SetActionsActiveAction { type: typeof ActionTypes.SET_ACTIONS_ACTIVE; start: number; end: number; active: boolean; } interface ReorderAction { type: typeof ActionTypes.REORDER_ACTION; actionId: number; beforeActionId: number; } interface JumpToStateAction { type: typeof ActionTypes.JUMP_TO_STATE; index: number; } interface JumpToActionAction { type: typeof ActionTypes.JUMP_TO_ACTION; actionId: number; } interface ImportStateAction, MonitorState> { type: typeof ActionTypes.IMPORT_STATE; nextLiftedState: LiftedState | readonly A[]; preloadedState?: S; noRecompute: boolean | undefined; } interface LockChangesAction { type: typeof ActionTypes.LOCK_CHANGES; status: boolean; } interface PauseRecordingAction { type: typeof ActionTypes.PAUSE_RECORDING; status: boolean; } export declare type LiftedAction, MonitorState> = PerformAction | ResetAction | RollbackAction | CommitAction | SweepAction | ToggleAction | SetActionsActiveAction | ReorderAction | JumpToStateAction | JumpToActionAction | ImportStateAction | LockChangesAction | PauseRecordingAction; /** * Action creators to change the History state. */ export declare const ActionCreators: { performAction>(action: A, trace?: boolean | ((action: A) => string | undefined) | undefined, traceLimit?: number | undefined, toExcludeFromTrace?: Function | undefined): { type: "PERFORM_ACTION"; action: A; timestamp: number; stack: string | undefined; }; reset(): ResetAction; rollback(): RollbackAction; commit(): CommitAction; sweep(): SweepAction; toggleAction(id: number): ToggleAction; setActionsActive(start: number, end: number, active?: boolean): SetActionsActiveAction; reorderAction(actionId: number, beforeActionId: number): ReorderAction; jumpToState(index: number): JumpToStateAction; jumpToAction(actionId: number): JumpToActionAction; importState, MonitorState = null>(nextLiftedState: LiftedState | readonly A_1[], noRecompute?: boolean | undefined): ImportStateAction; lockChanges(status: boolean): LockChangesAction; pauseRecording(status: boolean): PauseRecordingAction; }; export declare const INIT_ACTION: { type: string; }; /** * Lifts an app's action into an action on the lifted store. */ export declare function liftAction>(action: A, trace?: ((action: A) => string | undefined) | boolean, traceLimit?: number, toExcludeFromTrace?: Function): { type: "PERFORM_ACTION"; action: A; timestamp: number; stack: string | undefined; }; export interface LiftedState, MonitorState> { monitorState: MonitorState; nextActionId: number; actionsById: { [actionId: number]: PerformAction; }; stagedActionIds: number[]; skippedActionIds: number[]; committedState: S; currentStateIndex: number; computedStates: { state: S; error?: string; }[]; isLocked: boolean; isPaused: boolean; } /** * Creates a history state reducer from an app's reducer. */ export declare function liftReducerWith, MonitorState, MonitorAction extends Action>(reducer: Reducer, initialCommittedState: PreloadedState | undefined, monitorReducer: Reducer, options: Options): Reducer, LiftedAction>; /** * Provides an app's view into the state of the lifted store. */ export declare function unliftState, MonitorState, NextStateExt>(liftedState: LiftedState & NextStateExt): S & NextStateExt; export declare type LiftedReducer, MonitorState> = Reducer, LiftedAction>; export declare type LiftedStore, MonitorState> = Store, LiftedAction>; export declare type InstrumentExt, MonitorState> = { liftedStore: LiftedStore; }; export declare type EnhancedStore, MonitorState> = Store & InstrumentExt; /** * Provides an app's view into the lifted store. */ export declare function unliftStore, MonitorState, MonitorAction extends Action, NextExt, NextStateExt>(liftedStore: Store & NextStateExt, LiftedAction> & NextExt, liftReducer: (r: Reducer) => LiftedReducer, options: Options): Store & NextExt & { liftedStore: Store & NextStateExt, LiftedAction>; }; export interface Options, MonitorState, MonitorAction extends Action> { maxAge?: number | ((currentLiftedAction: LiftedAction, previousLiftedState: LiftedState | undefined) => number); shouldCatchErrors?: boolean; shouldRecordChanges?: boolean; pauseActionType?: unknown; shouldStartLocked?: boolean; shouldHotReload?: boolean; trace?: boolean | ((action: A) => string | undefined); traceLimit?: number; shouldIncludeCallstack?: boolean; } /** * Redux instrumentation store enhancer. */ export default function instrument, MonitorState = null, MonitorAction extends Action = never>(monitorReducer?: Reducer, options?: Options): StoreEnhancer>; export {};