Type Alias OperationCallback<ReturnValue, Value, Param>

OperationCallback<ReturnValue, Value, Param>: ((value: Value, param: Param, options: ParseOptions) => ReturnValue)

A callback that applies an operation to the shape output value.

If a ValidationError is thrown, its issues are captured and incorporated into a parsing result.

Type Parameters

  • ReturnValue = any

    The value returned by the operation.

  • Value = any

    The shape output value to which the operation must be applied.

  • Param = any

    The additional param that was associated with the operation.

Type declaration