Const
Casts a number to the NonPositiveInt branded type.
number
NonPositiveInt
Validates that the value is a non-positive integer and returns it with the NonPositiveInt brand. Throws a TypeError otherwise.
TypeError
The value as a NonPositiveInt
If the value is not a non-positive integer
Casts a
numberto theNonPositiveIntbranded type.Validates that the value is a non-positive integer and returns it with the
NonPositiveIntbrand. Throws aTypeErrorotherwise.