Testing · Senior · Question 30 of 75
What does expectTypeOf in Vitest test?
expectTypeOf(parse("1")).toEqualTypeOf<number>();- ✓Correct answer: Types at compile time - useful for libraries with complex generics
- 2The
typeofof runtime values - 3PropTypes of React components
Explanation
Type tests run with vitest --typecheck (or files *.test-d.ts).