From d7ba59270417e807e8823ccd4d138de5880a24ee Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Thu, 18 Aug 2022 11:34:10 +0200 Subject: [PATCH] docs(advanced): improve docs about global.d.ts (#16631) --- docs/src/test-advanced-js.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/src/test-advanced-js.md b/docs/src/test-advanced-js.md index 3d7f35cd38..5f760a9194 100644 --- a/docs/src/test-advanced-js.md +++ b/docs/src/test-advanced-js.md @@ -681,7 +681,9 @@ test('numeric ranges', () => { }); ``` -For TypeScript, also add the following to `global.d.ts`. You don't need it for JavaScript. +For TypeScript, also add the following to your [`global.d.ts`](https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-d-ts.html). If it does not exit, you need to create it inside your repository. Make sure that your `global.d.ts` gets included inside your `tsconfig.json` via the `include` or `compilerOptions.typeRoots` option so that your IDE will pick it up. + +You don't need it for JavaScript. ```js // global.d.ts