Skip to content

Commit a8cbfb7

Browse files
committed
Change constructor type for instanceOf expectation
It should result in an error.
1 parent d7c2b90 commit a8cbfb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ export interface Subscribable {
55
}): void;
66
}
77

8-
export type Constructor = (new (...args: any[]) => any);
8+
export type ErrorConstructor = new (...args: any[]) => Error;
99

1010
/** Specify one or more expectations the thrown error must satisfy. */
1111
export type ThrowsExpectation = {
1212
/** The thrown error must have a code that equals the given string or number. */
1313
code?: string | number;
1414

1515
/** The thrown error must be an instance of this constructor. */
16-
instanceOf?: Constructor;
16+
instanceOf?: ErrorConstructor;
1717

1818
/** The thrown error must be strictly equal to this value. */
1919
is?: Error;

0 commit comments

Comments
 (0)