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

createFrozenRegistry.md

35 lines775 Bytes

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