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