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