Type alias RefinePredicate<Value, RefinedValue, Param>

RefinePredicate<Value, RefinedValue, Param>: ((value, param, options) => value is RefinedValue)

A narrowing predicate that refines the value type.

If a ValidationError is thrown, its issues are captured and incorporated into a parsing result. Throw if refinement cannot be performed, and you want to abort the operation.

Type Parameters

  • Value = any

    The value to refine.

  • RefinedValue extends Value = Value

    The refined value.

  • Param = any

    The additional param that was associated with the operation.

Type declaration

Returns

true if value matches the predicate, or false otherwise.

See

Shape.refine