Const
Casts a number to the PositiveInt32 branded type.
number
PositiveInt32
Validates that the value is a positive integer in [1, 2^31) and returns it with the PositiveInt32 brand. Throws a TypeError otherwise.
TypeError
The value as a PositiveInt32
If the value is not a positive integer in [1, 2^31)
Casts a
numberto thePositiveInt32branded type.Validates that the value is a positive integer in [1, 2^31) and returns it with the
PositiveInt32brand. Throws aTypeErrorotherwise.