diff --git a/typings/index.d.ts b/typings/index.d.ts index b778aa7fa..a5716cecd 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -520,11 +520,17 @@ declare namespace CodeceptJS { } } +type TryTo = (fn: () => Promise | T) => Promise; +type HopeThat = (fn: () => Promise | T) => Promise; +type RetryTo = (fn: () => Promise | T, retries?: number) => Promise; + + // Globals declare const codecept_dir: string declare const output_dir: string -declare function tryTo(...fn): Promise -declare function retryTo(...fn): Promise +declare const tryTo: TryTo; +declare const retryTo: RetryTo; +declare const hopeThat: HopeThat; declare const actor: CodeceptJS.actor declare const codecept_actor: CodeceptJS.actor @@ -635,3 +641,9 @@ declare module 'codeceptjs' { declare module '@codeceptjs/helper' { export = CodeceptJS.Helper } + +declare module 'codeceptjs/effects' { + export const tryTo: TryTo; + export const retryTo: RetryTo; + export const hopeThat: HopeThat; +}

AltStyle によって変換されたページ (->オリジナル) /