Skip to content

Function: createCommandBuilder() ​

ts
function createCommandBuilder<TIn, TOut, THandle>(id, optionsOrState?): CommandBuilder<TIn, TOut, THandle>;

Defined in: builders/create-command-builder.ts:56

Creates a fluent CommandBuilder for P.command(id) or P.command(id, options).

Supports both progressive fluent chaining (.input(), .output(), .partitions(), .run()) and one-shot configuration via CommandConfigOptions, compiling into a deeply frozen CommandNode.

Type Parameters ​

Type ParameterDefault typeDescription
TInunknownValidated command input payload type.
TOutunknownValidated command output payload type.
THandleunknownRuntime handle type of the active isolation scope.

Parameters ​

ParameterTypeDescription
idstringUnique identifier of the command step.
optionsOrState?| CommandConfigOptions<TIn, TOut, THandle> | CreateCommandBuilderState<TIn, TOut, THandle>Direct config options or internal state.

Returns ​

CommandBuilder<TIn, TOut, THandle>

Frozen command builder.

Released under the MIT License.