@newbiz/vue-maintainer-libs
Version:
Vue.js maintainer 라이브러리
18 lines (17 loc) • 643 B
TypeScript
import Vue, { PluginFunction, PluginObject, VueConstructor } from 'vue';
import { Store, StoreOptions } from 'vuex';
export { StoreOptions } from 'vuex';
export declare type IPluginObject<T> = PluginObject<T> | PluginFunction<T>;
export interface IStoreModule<S> {
[key: string]: IStoreData<S>;
}
interface IStoreData<S> {
initialState: () => S;
module: StoreOptions<S>;
}
export interface IStore<T, S> {
vuex?: IPluginObject<T>;
root?: StoreOptions<S> | null;
modules?: IStoreModule<S> | null;
}
export declare function initStore<V extends Vue, T, S>(vueConstructor: VueConstructor<V>, store: IStore<T, S>): Store<S>;