Skip to content

Commit 1c0bbea

Browse files
Fix type definitions for vitest jest-extended
1 parent 4f38e7b commit 1c0bbea

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/setup/jestExtended.d.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
// Need to use interfaces, as they don't register the extended type definitions
2+
// otherwise.
3+
/* eslint-disable @typescript-eslint/no-empty-object-type */
14
// https://jest-extended.jestcommunity.dev/docs/getting-started/setup#use-with-vitest
25
import type CustomMatchers from 'jest-extended';
36
import 'vitest';
47

58
declare module 'vitest' {
6-
type Assertion<T = any> = CustomMatchers<T>
7-
type AsymmetricMatchersContaining<T = any> = CustomMatchers<T>
8-
type ExpectStatic<T = any> = CustomMatchers<T>
9+
interface Assertion<T = any> extends CustomMatchers<T> {}
10+
interface AsymmetricMatchersContaining<T = any> extends CustomMatchers<T> {}
11+
interface ExpectStatic<T = any> extends CustomMatchers<T> {}
912
}

0 commit comments

Comments
 (0)