Skip to content

Commit 23b2391

Browse files
authored
Merge pull request #523 from jthieman/reject-throw-sequential-return-value-types
Fix thenReject and thenThrow types
2 parents 102c53c + 3369a0c commit 23b2391

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ export const matchers: Matchers;
5656
export interface Stubber<D, R = D extends object ? Partial<D> : D> {
5757
thenReturn<T>(first: R, ...args: Array<R>): TestDouble<T>;
5858
thenDo<T>(f: Function): TestDouble<T>;
59-
thenThrow<T>(e: any): TestDouble<T>;
59+
thenThrow<T>(first: unknown, ...args: Array<unknown>): TestDouble<T>;
6060
thenResolve<T>(first: R, ...args: Array<R>): TestDouble<T>;
61-
thenReject<T>(e: any): TestDouble<T>;
61+
thenReject<T>(first: unknown, ...args: Array<unknown>): TestDouble<T>;
6262
thenCallback<T>(error: any, data: any): TestDouble<T>;
6363
}
6464

6565
export interface PromiseStubber<P, R = P extends object ? Partial<P> : P> {
6666
thenReturn<T>(first: Promise<R>, ...args: Array<Promise<R>>): TestDouble<T>;
6767
thenResolve<T>(first: R, ...args: Array<R>): TestDouble<T>;
6868
thenDo<T>(f: Function): TestDouble<T>;
69-
thenReject<T>(e: any): TestDouble<T>;
69+
thenReject<T>(first: unknown, ...args: Array<unknown>): TestDouble<T>;
7070
}
7171

7272
export interface TestdoubleConfig {

0 commit comments

Comments
 (0)