Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 542 Bytes

File metadata and controls

43 lines (31 loc) · 542 Bytes

typelab / assertions / IsTrue

type IsTrue<T> = _IsTrue<IfTrue<T, true, false>>;

Checks if a given type T is the literal true.

Type Parameters

Type Parameter Description

T

The type to be checked.

Returns

true if T is the literal true, false otherwise.

Example

type Valid = IsTrue<true>;    // true
type Invalid = IsTrue<boolean>; // false