Skip to content

Commit ee61dcf

Browse files
fraparisif
authored andcommitted
Fix implicit any (#64)
* Fix implicit any * Fix correct types * Update formatting * Missing export functions * Fix optional parameters * Update waitFor with generic * Fix waiter types
1 parent a796f15 commit ee61dcf

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/types/index.d.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import Vue, { PluginFunction } from 'vue';
22
import { Store } from 'vuex';
33

4-
type AsyncFunction = ((...args: any) => Promise<any>) | Promise<any>;
4+
5+
type AsyncFunction = ((arg0: any) => Promise<any>) | Promise<any>;
56

67
export default class VueWait extends VueWaitInstance {
78
constructor(options?: VueWaitOptions);
@@ -77,10 +78,9 @@ export class VueWaitInstance {
7778
* @param {number} [total]
7879
* @memberof VueWaitInstance
7980
*/
80-
progress(waiter: string, current: number, total?: number): void;
81+
progress(waiter: string, current: number, total?: number): Promise<any>;
8182

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;
8484
}
8585

8686
export interface VueWaitOptions{
@@ -113,3 +113,7 @@ export interface VueWaitOptions{
113113
*/
114114
directiveName?: string;
115115
}
116+
117+
export function mapWaitingGetters(getters: any): any;
118+
119+
export function mapWaitingActions(vuexModuleName: any, actions?: any): any;

0 commit comments

Comments
 (0)