docs: fix instructions for custom matchers type declarations (#11483)

Co-authored-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
William Bergeron-Drouin 2022-01-31 12:58:45 -05:00 committed by GitHub
parent a7e73cc389
commit 5a14aad368
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -554,11 +554,13 @@ test('numeric ranges', () => {
For TypeScript, also add the following to `global.d.ts`. You don't need it for JavaScript.
```js
```ts
// global.d.ts
declare namespace PlaywrightTest {
declare global {
namespace PlaywrightTest {
interface Matchers<R> {
toBeWithinRange(a: number, b: number): R;
}
}
}
```