|
1 | 1 | import Vue, { PluginFunction } from 'vue';
|
2 | 2 | import { Store } from 'vuex';
|
3 | 3 |
|
4 |
| -type AsyncFunction = ((...args: any) => Promise<any>) | Promise<any>; |
| 4 | + |
| 5 | +type AsyncFunction = ((arg0: any) => Promise<any>) | Promise<any>; |
5 | 6 |
|
6 | 7 | export default class VueWait extends VueWaitInstance {
|
7 | 8 | constructor(options?: VueWaitOptions);
|
@@ -77,10 +78,9 @@ export class VueWaitInstance {
|
77 | 78 | * @param {number} [total]
|
78 | 79 | * @memberof VueWaitInstance
|
79 | 80 | */
|
80 |
| - progress(waiter: string, current: number, total?: number): void; |
| 81 | + progress(waiter: string, current: number, total?: number): Promise<any>; |
81 | 82 |
|
82 |
| - waitFor(waiter: string, callback: AsyncFunction, forceSync?: false): Promise<any>; |
83 |
| - waitFor(waiter: string, callback: Function, forceSync: true): Promise<any>; |
| 83 | + waitFor<T extends Function | AsyncFunction>(waiter: string, callback: T, forceSync?: false): T; |
84 | 84 | }
|
85 | 85 |
|
86 | 86 | export interface VueWaitOptions{
|
@@ -113,3 +113,7 @@ export interface VueWaitOptions{
|
113 | 113 | */
|
114 | 114 | directiveName?: string;
|
115 | 115 | }
|
| 116 | + |
| 117 | +export function mapWaitingGetters(getters: any): any; |
| 118 | + |
| 119 | +export function mapWaitingActions(vuexModuleName: any, actions?: any): any; |
0 commit comments