Skip to content

Function: createLocalCommandBuilder() ​

ts
function createLocalCommandBuilder<TIn, TOut, THandle>(id, existingState?): LocalCommandBuilder<TIn, TOut, THandle>;

Defined in: node/src/builders/create-local-command-builder.ts:39

Creates a fluent LocalCommandBuilder for local.command(id).

Initializes default z.unknown() input and output schemas, 'closed' standard input mode, and a default runner pool descriptor so fluent chaining remains immutable and type-safe.

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.
existingState?LocalCommandBuilderState<TIn, TOut, THandle>Internal state for immutable cloning.

Returns ​

LocalCommandBuilder<TIn, TOut, THandle>

Frozen fluent command builder.

Throws ​

If id is empty or whitespace-only.

Released under the MIT License.