typelab / assertions / IsPositive
type IsPositive<T> = _IsTrue<IfPositive<T, true, false>>;Checks if a given number T is positive.
| Type Parameter | Description |
|---|---|
|
|
The type to be checked. |
true if T is a positive number, false otherwise.
type Valid = IsPositive<11 | 11n>; // true
type Invalid = IsPositive<-11 | -11n>; // false