UNPKG

@owlsdepartment/vuex-typed

Version:

Package for writing typed Vuex store with component helpers

10 lines (9 loc) 386 B
import { ExtractState, StateDef } from "../typings/index"; import { WithHelpers } from "./addHelpers"; export declare type MappedState<S extends StateDef, Out = ExtractState<S>> = { [K in keyof Out]: () => Out[K]; }; /** * Get Vuex state object, mapped for export */ export declare function getState<S extends StateDef>(state: S, namespace?: string): WithHelpers<MappedState<S>>;