typelab / assertions / IsEqual
type IsEqual<T1, T2> = IfEqual<T1, T2, true, false>;Check the type equality between T1 and T2.
| Type Parameter | Description |
|---|---|
|
|
The first type to compare. |
|
|
The second type to compare. |
true if types T1 is equal to T2, false otherwise.
type Equal = IsEqual<string, string>; // true
type NotEqual = IsEqual<string, ''>; // false