Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

createFrozenRegistry.md

31 lines808 Bytes

Function: createFrozenRegistry()

function createFrozenRegistry(tools): ToolRegistry;

Defined in: packages/typescript/ai/src/tool-registry.ts:119

Create a frozen (immutable) tool registry from a tools array.

This is used internally to wrap static tools arrays for backward compatibility. Add and remove operations are no-ops on frozen registries.

Parameters

tools

Tool<SchemaInput, SchemaInput, string>[] = []

The static array of tools

Returns

ToolRegistry

A frozen ToolRegistry