Skip to content

Commit f93ee6a

Browse files
authored
Fix typings (#6)
If we restrict `toMatchJSON` to only accept records, we can't actually compare arrays. At the moment, compiling `expect("[]").toMatchJSON([])` fails. Setting `expected` to any should fix that.
1 parent 95d4db4 commit f93ee6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare namespace jest {
44
interface Matchers<R> {
5-
toMatchJSON(expected: Record<string, unknown>): R;
5+
toMatchJSON(expected: any): R;
66
}
77

88
interface Expect {

0 commit comments

Comments
 (0)