Function: createScopedRuleBuilder()
ts
function createScopedRuleBuilder(idOrSource, options?): ScopedRuleBuilder;Defined in: builders/create-scoped-rule-builder.ts:19
Creates a fluent ScopedRuleBuilder for P.scopedRule(idOrSource).
Delegates to buildScopedRuleFromState to support both inline scoped rules and frontmatter-sourced scoped rule definitions.
Parameters
| Parameter | Type | Description |
|---|---|---|
idOrSource | | string | MaybeBuilder<SourceASTNode<{ checks: BuiltInCheckASTNode<unknown>[]; directive: string; id: string; when: { effects?: FsGlobMatcherNode; partitions: string[]; }; }>> | String identifier or frontmatter rule source. |
options? | CreateScopedRuleBuilderState | Optional internal copy-on-write state. |
Returns
Frozen ScopedRuleBuilder instance.