Skip to content

@kaiord/core


@kaiord/core / ToleranceViolation

Type Alias: ToleranceViolation ​

ToleranceViolation = object

Defined in: packages/core/src/domain/types/error-types.ts:50

Tolerance violation details for a specific field.

Used by ToleranceExceededError to provide detailed information about round-trip conversion errors.

Example ​

typescript
const violation: ToleranceViolation = {
  field: 'power',
  expected: 250,
  actual: 252,
  deviation: 2,
  tolerance: 1
};

Properties ​

actual ​

actual: number

Defined in: packages/core/src/domain/types/error-types.ts:56

Actual value after round-trip conversion


actualValue? ​

optional actualValue?: string

Defined in: packages/core/src/domain/types/error-types.ts:64

Round-tripped value of a categorical field


deviation ​

deviation: number

Defined in: packages/core/src/domain/types/error-types.ts:58

Absolute deviation from expected value


expected ​

expected: number

Defined in: packages/core/src/domain/types/error-types.ts:54

Expected value from original data


expectedValue? ​

optional expectedValue?: string

Defined in: packages/core/src/domain/types/error-types.ts:62

Original value of a categorical field (a duration type, a target unit)


field ​

field: string

Defined in: packages/core/src/domain/types/error-types.ts:52

The field that exceeded tolerance


tolerance ​

tolerance: number

Defined in: packages/core/src/domain/types/error-types.ts:60

Maximum allowed tolerance (0 when the value must match exactly)