-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix type definitions for vitest jest-extended
- Loading branch information
1 parent
4f38e7b
commit 1c0bbea
Showing
1 changed file
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
// Need to use interfaces, as they don't register the extended type definitions | ||
// otherwise. | ||
/* eslint-disable @typescript-eslint/no-empty-object-type */ | ||
// https://jest-extended.jestcommunity.dev/docs/getting-started/setup#use-with-vitest | ||
import type CustomMatchers from 'jest-extended'; | ||
import 'vitest'; | ||
|
||
declare module 'vitest' { | ||
type Assertion<T = any> = CustomMatchers<T> | ||
type AsymmetricMatchersContaining<T = any> = CustomMatchers<T> | ||
type ExpectStatic<T = any> = CustomMatchers<T> | ||
interface Assertion<T = any> extends CustomMatchers<T> {} | ||
interface AsymmetricMatchersContaining<T = any> extends CustomMatchers<T> {} | ||
interface ExpectStatic<T = any> extends CustomMatchers<T> {} | ||
} |