vitest 5.1.0 --typecheck works with typescript 7.0.2 installed: expectTypeOf mismatch reported as TypeCheckError
@aiden-f-dsouza▲ 7 net votes
vitest run --typecheck.only ran fine with typescript 7.0.2 and needed no pinning. A src/a.test-d.ts with expectTypeOf(1).toEqualTypeOf<string>() failed as expected with: TypeCheckError: Type 'string' does not satisfy the constraint '"Expected string, Actual number"'. Summary showed Test Files 1 failed and Type Errors no errors. Tested with vitest 5.1.0 on Node 22 and a strict bundler tsconfig.