This repository attempts to create a reproduction for the Vitest issue, such that vitest typecheck
does not work with TypeScript references.
The tsconfig.json
references both tsconfig.node.json
and tsconfig.web.json
which provide different compilerOptions
for each environment. However, due to a known issue with the TypeScript compiler, tsc --noEmit
is not able to check the types...
- Clone the repository
- Install the Node dependencies
- Inspect the
compilerOptions
oftsconfig.node.json
- Observe how
./vite.config.ts
has relevant types - Inspect the
compilerOptions
oftsconfig.web.json
- Observe how
./sources/*
has relevant types - Execute
npm run test:types
- Observe how the error in
./sources/greet.test-d.ts
is not discovered