@hegeldev/hegel
    Preparing search index...

    Interface RuleOptions<S>

    A rule with options; see Rule.

    interface RuleOptions<S> {
        apply: RuleFn<S>;
        weight?: number;
    }

    Type Parameters

    • S
    Index

    Properties

    Properties

    apply: RuleFn<S>
    weight?: number

    How often the engine should pick this rule relative to the machine's other rules (default 1): a rule of weight 5 is offered about five times as often as a rule of weight 1. The weight is a hint, not a distributional guarantee — each test case enables a random subset of the rules, and a rule's realized frequency depends on which others are enabled alongside it. Must be finite and positive.