import { HotModule } from '../core/interface'; export declare type F01 = (this: void, t?: T) => R; export declare type F1 = (this: void, a: A) => R; export declare type _ = {}; export interface Subscriber { (mutation: P, state: S): void; } export interface VueGetter { (s: S): R; } export interface CommitOption { silent?: boolean; } export declare type WatchHandler = (this: C, newVal: T, oldVal: T) => void; export interface WatchOption { deep?: boolean; immediate?: boolean; handler?: WatchHandler; } export declare type Unsubscription = () => void; export interface ActionStore { readonly state: S; readonly getters: G; readonly commit: C; readonly dispatch: D; } export interface GetDef { (s: S, g: G): T; } export declare type GetDefs = { [K in keyof T]: (s: S, g: G) => T[K]; } & { [k: string]: (s: S, g: G) => _; }; export declare type Getter = { readonly [k in K]: T; }; export interface MD0 { (s: S, t?: T): void; } export interface MD1 { (s: S, t: T): void; } export interface MutationHandler0 { (this: void, t?: T, opt?: CommitOption): void; } export interface MutationHandler1 { (this: void, t: T, opt?: CommitOption): void; } export declare type MDO = { [K in keyof T]: (s: S, t: T[K]) => void; } & { [k: string]: (s: S, t: any) => void; }; export interface C0 { (k: K, t?: T, opt?: CommitOption): void; } export interface CO0 { (k: keyof T, t?: undefined, opt?: CommitOption): void; } export interface C1 { (k: K, t: T, opt?: CommitOption): void; } export interface CO1 { (k: K, t: T[K], opt?: CommitOption): void; } export declare type CH0 = { [k in K]: MutationHandler0; }; export declare type COH0 = { [k in keyof T]: MutationHandler0; }; export declare type CH1 = { [k in K]: MutationHandler1; }; export declare type COH1 = { [K in keyof T]: MutationHandler1; }; export interface AD0 { (s: ActionStore, t?: T): Promise | R; } export declare type ADO0 = { [K in keyof R]: (s: any) => (Promise | R[K]); } & { [k: string]: (s: ActionStore) => any; }; export interface AD1 { (s: ActionStore, t: T): Promise | R; } export declare type ADO1 = { [K in keyof R]: (s: any, t: any) => Promise | R[K]; } & { [K in keyof T]: (s: any, t: T[K]) => any; } & { [k: string]: (s: ActionStore, t: any) => any; }; export declare type ActionHandler0 = F01>; export declare type ActionHandler1 = F1>; export interface D0 { (k: K, t?: T): Promise; } export interface DO0 { (k: K): Promise; } export interface D1 { (k: K, t: T): Promise; } export interface DO1 { (k: K, t: T[K]): Promise; } export declare type DH0 = { [k in K]: ActionHandler0; }; export declare type DHO0 = { [K in keyof R]: () => Promise; }; export declare type DH1 = { [k in K]: ActionHandler1; }; export declare type DHO1 = { [K in keyof (T | R)]: (t: T[K]) => Promise; }; export interface P0 { type: K; payload?: T; } export interface PO0 { type: keyof T; } export interface P1 { type: K; payload: T; } export declare type ModuleState = { readonly [k in K]: S; }; export interface Plugin { (s: Str): void; } export interface Helper { mapState(...keys: K[]): { [k in K]: () => S[k]; }; mapGetters(...keys: K[]): { [k in K]: () => G[k]; }; mapMutations(...keys: K[]): { [k in K]: CH[k]; }; mapActions(...keys: K[]): { [k in K]: DH[k]; }; } export declare type BG = {}; export declare type BC = C0; export declare type BCH = CH0; export declare type BD = D0; export declare type BDH = DH0; export declare type BP = P0; export declare type BaseOpt = Opt<{}, BG, BC, BD, BP, BCH, BDH>; export declare type BaseStore = Store<{}, BG, BC, BD, BP, BCH, BDH>; export declare type BasePlugin = Plugin; export declare type BaseSubscriber = Subscriber; export declare type BaseHelper = Helper<{}, BG, BCH, BDH>; export interface Opt { getter(key: K, f: GetDef): Opt & G, C, D, P, CH, DH>; getters(opt: GetDefs): Opt & G, C, D, P, CH, DH>; declareGetter(): Opt & G, C, D, P, CH, DH>; mutation(key: K, f: MD0): Opt & C, D, P0 | P, CH0 & CH, DH>; mutationWithArg(key: K, f: MD1): Opt & C, D, P1 | P, CH1 & CH, DH>; mutations void; }>(commits: T): Opt & C, D, PO0 | P, COH0 & CH, DH>; mutationsWithArg(commits: MDO): Opt & C, D, P1 | P, COH1 & CH, DH>; declareMutation(): Opt & C, D, P1 | P, CH1 & CH, DH>; action(key: K, f: AD0): Opt & D, P, CH, DH0 & DH>; actionWithArg(key: K, f: AD1): Opt & D, P, CH, DH1 & DH>; actions(dispatchs: ADO0): Opt & D, P, CH, DHO0 & DH>; actionsWithArg(dispatchs: ADO1): Opt & D, P, CH, DHO1 & DH>; declareAction(): Opt & D, P, CH, DH1 & DH>; module(key: K, o: Opt): Opt, G1 & G, C1 & C, D1 & D, P1 | P, CH1 & CH, DH1 & DH>; plugin(...plugins: Plugin>[]): this; done(module?: HotModule): Store; state_t: S; getters_t: G; commit_t: C; dispatch_t: D; payload_t: P; } export interface Store { readonly state: S; readonly getters: G; readonly commit: C; readonly dispatch: D; readonly helper: Helper; subscribe(fn: Subscriber): Unsubscription; watch(getter: VueGetter, cb: WatchHandler, options?: WatchOption): Function; replaceState(state: S): void; }