Type alias ReusableValidator<T>

ReusableValidator<T>: ((value: unknown, label?: string) => void)

Type Parameters

  • T

Type declaration

    • (value: unknown, label?: string): void
    • Test if the value matches the predicate. Throws an ArgumentError if the test fails.


      • value: unknown

        Value to test.

      • Optional label: string

        Override the label which should be used in error messages.

      Returns void