@owlsdepartment/vuex-typed
Version:
Package for writing typed Vuex store with component helpers
11 lines (10 loc) • 741 B
TypeScript
import { ActionsDef, GettersDef, MutationsDef, ObjectWithMethods, StateDef } from "../typings/index";
interface ModuleDef<State extends StateDef, Getters extends GettersDef<State>, Mutations extends MutationsDef<State>, Actions extends ObjectWithMethods = ActionsDef<State, Getters, Mutations>> {
namespaced?: boolean;
state?: State;
getters?: Getters;
mutations?: Mutations;
actions?: Actions;
}
export declare function defineModule<State extends StateDef, Getters extends GettersDef<State>, Mutations extends MutationsDef<State>, Actions extends ObjectWithMethods = ActionsDef<State, Getters, Mutations>>(module: ModuleDef<State, Getters, Mutations, Actions>): ModuleDef<State, Getters, Mutations, Actions>;
export {};