Const
Casts a number to the NonZeroInt32 branded type.
number
NonZeroInt32
Validates that the value is a non-zero integer in [-2^31, 2^31) and returns it with the NonZeroInt32 brand. Throws a TypeError otherwise.
TypeError
The value as a NonZeroInt32
If the value is not a non-zero integer in [-2^31, 2^31)
Casts a
numberto theNonZeroInt32branded type.Validates that the value is a non-zero integer in [-2^31, 2^31) and returns it with the
NonZeroInt32brand. Throws aTypeErrorotherwise.