Skip to content

validate types seems wrong #757

@ibesora

Description

@ibesora

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions