Assert that a type resolves to a boolean.
boolean
Type that must be true or false
true
false
Produces a compiler error if the provided type is not a boolean.
type A = AssertBoolean< true >; // ✓type B = AssertBoolean< string >; // ✗ TS error Copy
type A = AssertBoolean< true >; // ✓type B = AssertBoolean< string >; // ✗ TS error
Assert that a type resolves to a
boolean.