Skip to main content
function compileRuleDescriptor<Name, Config>(
   descriptor,
   config,
   ctx): RuleDescriptorCompilation;
Parses raw config through a descriptor schema, then compiles it into a rule-authored result.

Type Parameters

Name

Name extends string

Config

Config

Parameters

descriptor
required
RuleDescriptor<Name, Config>
config
unknown
required

Returns

RuleDescriptorCompilation Schema parsing fails loudly. This helper does not recover from invalid JSON or invalid rule config. Use compileRuleInstruction to attach a stable instruction identity before passing the result to model building.