Skip to content

Commit

Permalink
Merge pull request #16 from Null000/master
Browse files Browse the repository at this point in the history
Updating types
  • Loading branch information
ncjones authored Feb 28, 2024
2 parents eb513f3 + cc9c32e commit 672eeb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions retry-assert.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* .fn(() => httpClient.get('/deleted-resource'))
* .ensure(response => expect(response).toHaveProperty('status', 404))
*/
declare function retry<T>(fn?: () => T): RetryBuilder<T>;
declare function retry<T>(fn?: () => Promise<T> | T): RetryBuilder<T>;

declare namespace retry {

Expand Down Expand Up @@ -82,7 +82,7 @@ interface RetryBuilder<T> {
* result of the final invocation of the given function will be resolved by the
* promise returned by this builder's terminal operation.
*/
fn<U>(fn: () => U): RetryBuilder<U>;
fn<U>(fn: () => Promise<U> | U): RetryBuilder<U>;

/**
* Set the assertion function to apply to the result of each invocation of the
Expand Down

0 comments on commit 672eeb8

Please sign in to comment.