Skip to content

Commit c95f78d

Browse files
authored
fix: missing module 'codeceptjs/effects' (#5094)
1 parent b27e9cf commit c95f78d

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

typings/index.d.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,11 +520,17 @@ declare namespace CodeceptJS {
520520
}
521521
}
522522

523+
type TryTo = <T>(fn: () => Promise<T> | T) => Promise<T | false>;
524+
type HopeThat = <T>(fn: () => Promise<T> | T) => Promise<T | false>;
525+
type RetryTo = <T>(fn: () => Promise<T> | T, retries?: number) => Promise<T>;
526+
527+
523528
// Globals
524529
declare const codecept_dir: string
525530
declare const output_dir: string
526-
declare function tryTo(...fn): Promise<boolean>
527-
declare function retryTo(...fn): Promise<null>
531+
declare const tryTo: TryTo;
532+
declare const retryTo: RetryTo;
533+
declare const hopeThat: HopeThat;
528534

529535
declare const actor: CodeceptJS.actor
530536
declare const codecept_actor: CodeceptJS.actor
@@ -635,3 +641,9 @@ declare module 'codeceptjs' {
635641
declare module '@codeceptjs/helper' {
636642
export = CodeceptJS.Helper
637643
}
644+
645+
declare module 'codeceptjs/effects' {
646+
export const tryTo: TryTo;
647+
export const retryTo: RetryTo;
648+
export const hopeThat: HopeThat;
649+
}

0 commit comments

Comments
 (0)