Type Alias Validator<U, V>

Validator<U, V>: ((value: U) => ValidationResult<V>)

An input validator. A function which checks whether an input is valid and transforms that input.

Type Parameters

  • U

    The type of the input.

  • V

    The type of the output (the transformed input).