Skip to content

Commit 407f12f

Browse files
authored
docs: improve extending matchers docs (#6121)
1 parent d7b0387 commit 407f12f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/guide/extending-matchers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ expect.extend({
2626
If you are using TypeScript, you can extend default `Assertion` interface in an ambient declaration file (e.g: `vitest.d.ts`) with the code below:
2727

2828
```ts
29-
import type { Assertion, AsymmetricMatchersContaining } from 'vitest'
29+
import 'vitest'
3030

3131
interface CustomMatchers<R = unknown> {
3232
toBeFoo: () => R
@@ -45,7 +45,7 @@ Don't forget to include the ambient declaration file in your `tsconfig.json`.
4545
The return value of a matcher should be compatible with the following interface:
4646

4747
```ts
48-
interface MatcherResult {
48+
interface ExpectationResult {
4949
pass: boolean
5050
message: () => string
5151
// If you pass these, they will automatically appear inside a diff when

0 commit comments

Comments
 (0)