import _Vue, { WatchOptions } from "vue"; // augment typings of Vue.js import "./vue"; import { mapState, mapMutations, mapGetters, mapActions, createNamespacedHelpers } from "./helpers"; export * from "./helpers"; export declare class Store { constructor(options: StoreOptions); readonly state: S; readonly getters: any; replaceState(state: S): void; dispatch: Dispatch; commit: Commit; subscribe

(fn: (mutation: P, state: S) => any): () => void; subscribeAction

(fn: SubscribeActionOptions): () => void; watch(getter: (state: S, getters: any) => T, cb: (value: T, oldValue: T) => void, options?: WatchOptions): () => void; registerModule(path: string, module: Module, options?: ModuleOptions): void; registerModule(path: string[], module: Module, options?: ModuleOptions): void; unregisterModule(path: string): void; unregisterModule(path: string[]): void; hotUpdate(options: { actions?: ActionTree; mutations?: MutationTree; getters?: GetterTree; modules?: ModuleTree; }): void; } export declare function install(Vue: typeof _Vue): void; export interface Dispatch { (type: string, payload?: any, options?: DispatchOptions): Promise;

(payloadWithType: P, options?: DispatchOptions): Promise; } export interface Commit { (type: string, payload?: any, options?: CommitOptions): void;

(payloadWithType: P, options?: CommitOptions): void; } export interface ActionContext { dispatch: Dispatch; commit: Commit; state: S; getters: any; rootState: R; rootGetters: any; } export interface Payload { type: string; } export interface MutationPayload extends Payload { payload: any; } export interface ActionPayload extends Payload { payload: any; } export type ActionSubscriber = (action: P, state: S) => any; export interface ActionSubscribersObject { before?: ActionSubscriber; after?: ActionSubscriber; } export type SubscribeActionOptions = ActionSubscriber | ActionSubscribersObject; export interface DispatchOptions { root?: boolean; } export interface CommitOptions { silent?: boolean; root?: boolean; } export interface StoreOptions { state?: S | (() => S); getters?: GetterTree; actions?: ActionTree; mutations?: MutationTree; modules?: ModuleTree; plugins?: Plugin[]; strict?: boolean; } export type ActionHandler = (this: Store, injectee: ActionContext, payload?: any) => any; export interface ActionObject { root?: boolean; handler: ActionHandler; } export type Getter = (state: S, getters: any, rootState: R, rootGetters: any) => any; export type Action = ActionHandler | ActionObject; export type Mutation = (state: S, payload?: any) => any; export type Plugin = (store: Store) => any; export interface Module { namespaced?: boolean; state?: S | (() => S); getters?: GetterTree; actions?: ActionTree; mutations?: MutationTree; modules?: ModuleTree; } export interface ModuleOptions { preserveState?: boolean; } export interface GetterTree { [key: string]: Getter; } export interface ActionTree { [key: string]: Action; } export interface MutationTree { [key: string]: Mutation; } export interface ModuleTree { [key: string]: Module; } declare const _default: { Store: typeof Store; install: typeof install; mapState: typeof mapState, mapMutations: typeof mapMutations, mapGetters: typeof mapGetters, mapActions: typeof mapActions, createNamespacedHelpers: typeof createNamespacedHelpers, }; export default _default;