Function: castNumberType()
Safe casts a value to an expected type. First paramter is an example of the expected type. Second parameter is the value to cast.
castNumberType<
T>(expectedType,valToCast):T
Defined in: packages/bitbadgesjs-sdk/src/common/math.ts:71
Safe casts a value to an expected type. First paramter is an example of the expected type. Second parameter is the value to cast.
Type Parameters
T
T extends NumberType
Parameters
expectedType
T
valToCast
Returns
T