Skip to main content
function defineRuleDescriptor<Name, Schema>(descriptor): RuleDescriptor<Name, output<Schema>>;
Defines a typed low-level CP-SAT rule descriptor.

Type Parameters

Name

Name extends string

Schema

Schema extends ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>

Parameters

name
Name
required
schema
Schema
required
compile
required

Returns

RuleDescriptor<Name, output<Schema>> Use this for custom rules that should participate in the same descriptor and artifact pipeline as the built-in rules.