Skip to content

Function: createHumanBuilder() ​

ts
function createHumanBuilder<TMode>(id, options?): HumanBuilder<TMode>;

Defined in: builders/create-human-builder.ts:66

Creates a fluent HumanBuilder for P.human(id).

Tracks the channel interaction mode ('bidirectional' | 'notify-only') and validates that .withName(alias).output(schema) is only called on bidirectional channels.

Type Parameters ​

Type ParameterDefault typeDescription
TMode extends "bidirectional" | "notify-only""bidirectional" | "notify-only"Interaction mode ('bidirectional' | 'notify-only').

Parameters ​

ParameterTypeDescription
idstringUnique identifier of the human authority role.
options?CreateHumanBuilderState<TMode>Optional internal copy-on-write state.

Returns ​

HumanBuilder<TMode>

Frozen HumanBuilder instance.

Released under the MIT License.