import * as Redux from 'redux'; import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable'; import { AdaptableState } from '../../AdaptableState/AdaptableState'; import { BaseState } from '../../AdaptableState/BaseState'; import { IAdaptableStore, LoadStoreConfig } from './Interface/IAdaptableStore'; type EmitterCallback = (data?: any) => any; type EmitterAnyCallback = (eventName: string, data?: any) => any; export declare const getPersistableState: (state: AdaptableState) => AdaptableState; export interface ResetUserDataAction extends Redux.Action { } export interface InitStateAction extends Redux.Action { } export interface LoadStateAction extends Redux.Action { State: { [s: string]: BaseState; }; } export declare const InitState: () => ResetUserDataAction; export declare const LoadState: (State: { [s: string]: BaseState; }) => LoadStateAction; export declare class AdaptableStore implements IAdaptableStore { TheStore: Redux.Store; Load: Promise; private emitter; private beforeEmitter; private storageEngine; private currentStorageState?; private previousStorageState?; private loadStorageInProgress; private loadStateOnStartup; on: (eventName: string, callback: EmitterCallback) => (() => void); onAny: (callback: EmitterAnyCallback) => (() => void); onBeforeAny: (callback: EmitterAnyCallback) => (() => void); emit: (eventName: string, data: any) => Promise; /** * * @param adaptable The Adaptable instance * @param postLoadHook A function that hydrates the state after it has been loaded from storage */ constructor(adaptable: IAdaptable); destroy(): void; getCurrentStorageState(): AdaptableState; getPreviousStorageState(): AdaptableState; saveStateNow(adaptable: IAdaptable, state?: AdaptableState): Promise; loadStore: (config: LoadStoreConfig) => Promise; } export {};