Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 966 Bytes

types.numbertypeconfig.md

File metadata and controls

37 lines (31 loc) · 966 Bytes

Home > @skunkteam/types > NumberTypeConfig

NumberTypeConfig type

Configuration of additional checks on numeric types.

Signature:

type NumberTypeConfig = {
    multipleOf?: number;
    customMessage?: CustomMessage<number, NumberViolation[]> | Partial<Record<NumberViolation, CustomMessage<number, NumberViolation>>>;
} & (
    | {
          minExclusive?: number;
          min?: undefined;
      }
    | {
          minExclusive?: undefined;
          min?: number;
      }
) &
    (
        | {
              maxExclusive?: number;
              max?: undefined;
          }
        | {
              maxExclusive?: undefined;
              max?: number;
          }
    );

References: CustomMessage, NumberViolation