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

createFrozenRegistry.md

31 lines808 Bytes

1---
2id: createFrozenRegistry
3title: createFrozenRegistry
4---
5​
6# Function: createFrozenRegistry()
7​
8```ts
9function createFrozenRegistry(tools): ToolRegistry;
10```
11​
12Defined in: [packages/typescript/ai/src/tool-registry.ts:119](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/tool-registry.ts#L119)
13​
14Create a frozen (immutable) tool registry from a tools array.
15​
16This is used internally to wrap static `tools` arrays for backward compatibility.
17Add and remove operations are no-ops on frozen registries.
18​
19## Parameters
20​
21### tools
22​
23[`Tool`](../interfaces/Tool.md)\<[`SchemaInput`](../type-aliases/SchemaInput.md), [`SchemaInput`](../type-aliases/SchemaInput.md), `string`\>[] = `[]`
24​
25The static array of tools
26​
27## Returns
28​
29[`ToolRegistry`](../interfaces/ToolRegistry.md)
30​
31A frozen ToolRegistry