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

ModalitiesArrayToUnion.md

21 lines491 Bytes

Type Alias: ModalitiesArrayToUnion<T>

type ModalitiesArrayToUnion<T> = T[number];

Defined in: packages/ai/src/types.ts:299

Helper type to convert a readonly array of modalities to a union type. e.g., readonly ['text', 'image'] -> 'text' | 'image'

Type Parameters

T

T extends ReadonlyArray<Modality>