Enforces that a numeric value must be an exact multiple of the specified
divisor. This constraint validates that the input value satisfies: input %
divisor === 0.
Example usage:
typeEvenNumber = number & tags.MultipleOf<2>; // Must be even (2, 4, 6, ...) typeDollarAmount = number & tags.MultipleOf<0.01>; // Must be in cents
Common use cases include validating even/odd numbers, currency amounts, time
intervals, or any value that must align to specific increments.
Type Parameters
Valueextendsnumber|bigint
The divisor value that input must be a multiple of (number
or bigint literal)
Multiple of constraint tag.
Enforces that a numeric value must be an exact multiple of the specified divisor. This constraint validates that the input value satisfies: input % divisor === 0.
Example usage:
Common use cases include validating even/odd numbers, currency amounts, time intervals, or any value that must align to specific increments.