UNPKG

@owlsdepartment/vuex-typed

Version:

Package for writing typed Vuex store with component helpers

23 lines (22 loc) 907 B
import { ModuleDef } from "../typings/index"; import { MappedState } from "./getState"; import { MappedGetters } from "./getGetters"; import { MappedMutations } from "./getMutations"; import { MappedActions } from "./getActions"; import { WithHelpers } from "./addHelpers"; declare type MappedModule<M extends ModuleDef> = { state: WithHelpers<MappedState<NonNullable<M['state']>>>; getters: WithHelpers<MappedGetters<NonNullable<M['getters']>>>; mutations: WithHelpers<MappedMutations<NonNullable<M['mutations']>>>; actions: WithHelpers<MappedActions<NonNullable<M['actions']>>>; }; /** * Get Vuex module elements, mapped for export */ export declare function getModule<M extends ModuleDef>(module: M, namespace?: string): MappedModule<M>; /** * Get Vuex module elements, mapped for export * Alias for `getModule` */ export declare const getModuleImports: typeof getModule; export {};