Type alias OperationCallback<ReturnValue, Value, Param>

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

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

    • (value, param, options): 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.

      Parameters

      • value: Value

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

      • param: Param

        The additional param that was associated with the operation.

      • options: ApplyOptions

        Parsing options.

      Returns ReturnValue