The typing for validate is function validate(value: string, format: Format | string): boolean; but according to the code comments in validating.js#L244 the expected types are string | number | Numbro.
This makes validating both the input and format like validate(325, { mantissa: 2 }) impossible because you get a typescript error.
Am I misunderstanding how validate should be used?
The typing for
validate
isfunction validate(value: string, format: Format | string): boolean;
but according to the code comments in validating.js#L244 the expected types arestring | number | Numbro
. This makes validating both the input and format likevalidate(325, { mantissa: 2 })
impossible because you get a typescript error.Am I misunderstanding how
validate
should be used?