Vitest · Matcher
toBeString
Vitest's expectTypeOf checks TypeScript types at compile time. Use it in type tests to verify exact types, assignability, properties, function parameters, arrays, and promise results.
Last updated
Syntax
<T>(a: unknown) => ExpectTypeOfIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
toEqualTypeOftoExtendtoHavePropertyitemsresolvestoBeCallableWithassertType