Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate types seems wrong #757

Open
ibesora opened this issue Apr 3, 2024 · 0 comments
Open

validate types seems wrong #757

ibesora opened this issue Apr 3, 2024 · 0 comments

Comments

@ibesora
Copy link

ibesora commented Apr 3, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant