Skip to content

Commit

Permalink
docs: update extending-matchers.md (#3557)
Browse files Browse the repository at this point in the history
Co-authored-by: Vladimir <sleuths.slews0s@icloud.com>
  • Loading branch information
sagargurtu and sheremet-va committed Jun 20, 2023
1 parent edad9b1 commit 45ca138
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/guide/extending-matchers.md
Expand Up @@ -26,6 +26,8 @@ expect.extend({
If you are using TypeScript, since Vitest 0.31.0 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'

interface CustomMatchers<R = unknown> {
toBeFoo(): R
}
Expand Down

0 comments on commit 45ca138

Please sign in to comment.