Docs
CodeRabbit
Cloudflare
Railway
WorkOS
OpenRouter
Clerk
AG Grid
SerpAPI
Netlify
Prisma
Unkey
Electric
Sentry
CodeRabbit
Cloudflare
Railway
WorkOS
OpenRouter
Clerk
AG Grid
SerpAPI
Netlify
Prisma
Unkey
Electric
Sentry
Class References
Function References
Interface References
Type Alias References
Variable References
Type Alias References

ModalitiesArrayToUnion

Type Alias: ModalitiesArrayToUnion<T>

ts
type ModalitiesArrayToUnion<T> = T[number];
type ModalitiesArrayToUnion<T> = T[number];

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

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>