|
@@ -5,6 +5,7 @@ type Dictionary<T> = { [key: string]: T };
|
|
|
type Computed = () => any;
|
|
|
type MutationMethod = (...args: any[]) => void;
|
|
|
type ActionMethod = (...args: any[]) => Promise<any>;
|
|
|
+type CustomVue = Vue & Dictionary<any>
|
|
|
|
|
|
interface Mapper<R> {
|
|
|
(map: string[]): Dictionary<R>;
|
|
@@ -17,26 +18,26 @@ interface MapperWithNamespace<R> {
|
|
|
}
|
|
|
|
|
|
interface FunctionMapper<F, R> {
|
|
|
- (map: Dictionary<(this: typeof Vue, fn: F, ...args: any[]) => any>): Dictionary<R>;
|
|
|
+ (map: Dictionary<(this: CustomVue, fn: F, ...args: any[]) => any>): Dictionary<R>;
|
|
|
}
|
|
|
|
|
|
interface FunctionMapperWithNamespace<F, R> {
|
|
|
(
|
|
|
namespace: string,
|
|
|
- map: Dictionary<(this: typeof Vue, fn: F, ...args: any[]) => any>
|
|
|
+ map: Dictionary<(this: CustomVue, fn: F, ...args: any[]) => any>
|
|
|
): Dictionary<R>;
|
|
|
}
|
|
|
|
|
|
interface MapperForState {
|
|
|
<S>(
|
|
|
- map: Dictionary<(this: typeof Vue, state: S, getters: any) => any>
|
|
|
+ map: Dictionary<(this: CustomVue, state: S, getters: any) => any>
|
|
|
): Dictionary<Computed>;
|
|
|
}
|
|
|
|
|
|
interface MapperForStateWithNamespace {
|
|
|
<S>(
|
|
|
namespace: string,
|
|
|
- map: Dictionary<(this: typeof Vue, state: S, getters: any) => any>
|
|
|
+ map: Dictionary<(this: CustomVue, state: S, getters: any) => any>
|
|
|
): Dictionary<Computed>;
|
|
|
}
|
|
|
|