forked from vuejs/vuex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelpers.d.ts
20 lines (15 loc) · 898 Bytes
/
helpers.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import Vue = require("vue");
type Dictionary<T> = { [key: string]: T };
export function mapState (map: string[]): Dictionary<() => any>;
export function mapState (map: Dictionary<string>): Dictionary<() => any>;
export function mapState <S>(
map: Dictionary<(this: typeof Vue, state: S, getters: any) => any>
): Dictionary<() => any>;
type MutationMethod = (...args: any[]) => void;
export function mapMutations (map: string[]): Dictionary<MutationMethod>;
export function mapMutations (map: Dictionary<string>): Dictionary<MutationMethod>;
export function mapGetters (map: string[]): Dictionary<() => any>;
export function mapGetters (map: Dictionary<string>): Dictionary<() => any>;
type ActionMethod = (...args: any[]) => Promise<any[]>;
export function mapActions (map: string[]): Dictionary<ActionMethod>;
export function mapActions (map: Dictionary<string>): Dictionary<ActionMethod>;