import { Map as ImmutableMap } from 'immutable'; export declare type StateId = KeyType; export declare type BranchId = KeyType; export declare type StateHash = string; export interface Configuration { /** * A flag indicating whether or not to print per-action debug information */ debug?: boolean; /** * A Predicate filter to determine whether an action is insertable into the history view. * If an action is not insertable, then the new state as the result of the action will replace * the current state */ actionFilter: (actionType: string) => boolean; /** * A predicate for determining whether two states are equal */ stateEqualityPredicate: (s1: T, s2: T) => boolean; /** * A function for generating map keys for states */ stateKeyGenerator: (state: T) => StateHash; /** * Action Names */ loadActionType: string; clearActionType: string; undoActionType: string; redoActionType: string; jumpToStateActionType: string; jumpToBranchActionType: string; jumpToLatestOnBranchActionType: string; createBranchActionType: string; squashActionType: string; renameBranchActionType: string; renameStateActionType: string; initialBranchName: string; initialStateName: string; skipToStartActionType: string; skipToEndActionType: string; /** * State and Branch Naming */ actionName: (state: any, stateId: StateId) => string; branchName: (oldBranch: BranchId, newBranch: BranchId, actionName: string) => string; canHandleAction: (action: any) => boolean; handleAction: (action: any, history: DagHistory) => DagHistory; } export declare type RawConfiguration = { [P in keyof Configuration]?: Configuration[P]; }; /** * This interface represents the state shape of the DAG history in the Redux * state tree. */ export interface DagHistory { /** * The current application state */ current: T; /** * The explored state space, represented as a graph (future and past). * See DagGraph.ts and createHistory.ts for more details on the structure of this */ graph: ImmutableMap; } export declare type StateIdGenerator = (lastStateId: StateId) => StateId; export declare type StateNameGenerator = (state: any, id: StateId) => string; export interface RenameBranchPayload { branch: BranchId; name: string; }