Skip to content

@kaiord/core


@kaiord/core / ToleranceViolation

Type Alias: ToleranceViolation

ToleranceViolation = object

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

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:49

Actual value after round-trip conversion


deviation

deviation: number

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

Absolute deviation from expected value


expected

expected: number

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

Expected value from original data


field

field: string

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

The field that exceeded tolerance


tolerance

tolerance: number

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

Maximum allowed tolerance