After including @types/jest
in my package.json file, TypeScript and VS Code now consider all .ts files to have additional global variables such as test
, describe
, expect
, afterAll
, afterEach
, and beforeEach
. Is there a way to specify that these globals should only apply to .jest.ts files or something similar?
Alternatively, is there a method to enforce importing these functions instead of allowing them to be used as global variables?