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