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

isContentPartArray.md

27 lines623 Bytes

1---
2id: isContentPartArray
3title: isContentPartArray
4---
5​
6# Function: isContentPartArray()
7​
8```ts
9function isContentPartArray(value): value is ContentPart[];
10```
11​
12Defined in: [packages/ai/src/utilities/tool-result.ts:42](https://github.com/TanStack/ai/blob/main/packages/ai/src/utilities/tool-result.ts#L42)
13​
14True iff `value` is a NON-EMPTY array whose every element is a valid
15`ContentPart`. Empty arrays and mixed arrays return false so they continue
16to be treated as ordinary (stringified) data — this keeps the auto-detection
17footgun narrow.
18​
19## Parameters
20​
21### value
22​
23`unknown`
24​
25## Returns
26​
27`value is ContentPart[]`