Skip to content

Commit

Permalink
Update ExpectAPI.md
Browse files Browse the repository at this point in the history
Update doc to add types for custom matchers

Fix : jestjs#10642
  • Loading branch information
ajubin committed Mar 18, 2021
1 parent 420bcb7 commit 7a98ccb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/ExpectAPI.md
Expand Up @@ -70,11 +70,9 @@ test('numeric ranges', () => {
_Note_: In TypeScript, when using `@types/jest` for example, you can declare the new `toBeWithinRange` matcher like this:

```ts
declare global {
namespace jest {
interface Matchers<R> {
toBeWithinRange(a: number, b: number): R;
}
declare namespace jest {
interface Matchers<R> {
toBeWithinRange(a: number, b: number): R;
}
}
```
Expand Down

0 comments on commit 7a98ccb

Please sign in to comment.