-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
/
Copy pathhelpers.d.ts
32 lines (27 loc) · 1.74 KB
/
helpers.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import Vue from "vue";
type Dictionary<T> = { [key: string]: T };
export function mapState (map: string[]): Dictionary<() => any>;
export function mapState (namespace: string, map: string[]): Dictionary<() => any>;
export function mapState (map: Dictionary<string>): Dictionary<() => any>;
export function mapState (namespace: string, map: Dictionary<string>): Dictionary<() => any>;
export function mapState <S>(
map: Dictionary<(this: typeof Vue, state: S, getters: any) => any>
): Dictionary<() => any>;
export function mapState <S>(
namespace: string,
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 (namespace: string, map: string[]): Dictionary<MutationMethod>;
export function mapMutations (map: Dictionary<string>): Dictionary<MutationMethod>;
export function mapMutations (namespace: string, map: Dictionary<string>): Dictionary<MutationMethod>;
export function mapGetters (map: string[]): Dictionary<() => any>;
export function mapGetters (namespace: string, map: string[]): Dictionary<() => any>;
export function mapGetters (map: Dictionary<string>): Dictionary<() => any>;
export function mapGetters (namespace: string, map: Dictionary<string>): Dictionary<() => any>;
type ActionMethod = (...args: any[]) => Promise<any[]>;
export function mapActions (map: string[]): Dictionary<ActionMethod>;
export function mapActions (namespace: string, map: string[]): Dictionary<ActionMethod>;
export function mapActions (map: Dictionary<string>): Dictionary<ActionMethod>;
export function mapActions (namespace: string, map: Dictionary<string>): Dictionary<ActionMethod>;