maxHoursPerDay, timeOff, etc.). Custom
rules can use defineRule to create entries that plug into the same
resolution and compilation pipeline.
Type Parameters
Name
Name extends string
Fields
Fields extends object
Parameters
Rule name. Must match a key in the active rule registry.
Rule-specific configuration fields.
resolve
(
ctx) => Record<string, unknown> & objectOptional custom resolver. When omitted, the default
resolution applies: appliesTo is mapped to roleIds/skillIds/memberIds,
dates is renamed to specificDates, and all other fields pass through.Returns
RuleEntry<Name, SanitizedRuleFields<Fields>>
The returned entry always preserves its rule name and fields. To validate custom
rules at the point of creation, use defineRuleFor to bind defineRule
to a specific registry.