diff --git a/docs/guide/extending-matchers.md b/docs/guide/extending-matchers.md index 1c650cc85..e5a6f7015 100644 --- a/docs/guide/extending-matchers.md +++ b/docs/guide/extending-matchers.md @@ -26,7 +26,7 @@ expect.extend({ 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: ```ts -import type { Assertion, AsymmetricMatchersContaining } from 'vitest' +import 'vitest' interface CustomMatchers { toBeFoo: () => R @@ -45,7 +45,7 @@ Don't forget to include the ambient declaration file in your `tsconfig.json`. The return value of a matcher should be compatible with the following interface: ```ts -interface MatcherResult { +interface ExpectationResult { pass: boolean message: () => string // If you pass these, they will automatically appear inside a diff when