Interface ParameterizedOperationOptions<Param>

Options of an operation.

interface ParameterizedOperationOptions<Param> {
    param: Param;
    tolerance?: OperationTolerance;
    type?: any;
}

Type Parameters

  • Param

    The param that is passed to a callback when an operation is applied.

Hierarchy (view full)

Properties

param: Param

The additional param associated with the operation. Usually contains a type-specific data is used in the Operation.callback.

See

Operation.param

Default

undefined
tolerance?: OperationTolerance

The operation tolerance for issues that are raised during validation.

  • If skip then if preceding operations have raised issues, then this operation is skipped but consequent operations are still applied.
  • If abort then if preceding operations have raised issues, then this operation is skipped and consequent operations aren't applied. Also, if this operation itself raises issues then consequent operations aren't applied.
  • If auto then the operation is applied regardless of previously raised issues.

See

Operation.tolerance

Default

'auto'
type?: any

The type of the operation such as "string.regex" or "array.includes". If omitted then operation callback is used as its type.