Function: createPoolBuilder()
ts
function createPoolBuilder<TItem>(id, options?): PoolBuilder<TItem>;Defined in: builders/create-pool-builder.ts:26
Creates a fluent PoolBuilder for P.pool(id).
Defaults the selection strategy to 'round-robin' and validates at .toAST() time that at least one candidate item has been registered via .with(...).
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TItem extends ASTNode | ASTNode | Pool candidate AST node type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier of the pool. |
options? | CreatePoolBuilderState<TItem> | Optional internal copy-on-write state. |
Returns
PoolBuilder<TItem>
Frozen PoolBuilder instance.