Vitest · Function
assertType
assertType<T>(value) checks that a value has the expected TypeScript type. It only matters during Vitest type checking, not during normal runtime tests.
Last updated
Syntax
<T>(value: T): voidIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
expectTypeOftypecheck.include*.test-d.ts--typecheck