Vitest · Matcher
toEqualTypeOf
toEqualTypeOf checks that a tested TypeScript type is fully equal to an expected type. It checks type shape, not runtime object values.
Last updated
Syntax
expectTypeOf(value).toEqualTypeOf<T>()
expectTypeOf(value).toEqualTypeOf(expected)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
expectTypeOftoExtendtoMatchTypeOfassertType