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