Skip to content

Commit 81c1ad7

Browse files
committed
Add global module augmentation for namespace jest
- This changes was made because TypeScript 4.7 and 4.8 need an explicit global module augmentation for the `jest` namespace.
1 parent 325d540 commit 81c1ad7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/toolkit/src/tests/utils/CustomMatchers.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,10 @@ interface CustomMatchers<R = unknown> {
88
declare module "vitest" {
99
interface Assertion<T = any> extends CustomMatchers<T> {}
1010
interface AsymmetricMatchersContaining extends CustomMatchers {}
11+
}
12+
13+
declare global {
14+
namespace jest {
15+
interface Matchers<R> extends CustomMatchers<R> {}
16+
}
1117
}

0 commit comments

Comments
 (0)