Function: createPolicyBuilder()
ts
function createPolicyBuilder<THandle>(id, options?): PolicyBuilder<THandle>;Defined in: builders/create-policy-builder.ts:36
Creates a fluent PolicyBuilder for P.policy(id).
Assigns deterministic guard clause identifiers "${id}:clause:${i}" and supports .extend(newId) inheritance with re-keyed clause identifiers.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
THandle | unknown | Runtime handle type of the active isolation scope. |
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier of the policy. |
options? | CreatePolicyBuilderState<THandle> | Optional internal copy-on-write state. |
Returns
PolicyBuilder<THandle>
Frozen PolicyBuilder instance.