Docs
CodeRabbit
Cloudflare
Railway
OpenRouter
Clerk
WorkOS
AG Grid
SerpAPI
Netlify
Electric
Unkey
Sentry
Prisma
CodeRabbit
Cloudflare
Railway
OpenRouter
Clerk
WorkOS
AG Grid
SerpAPI
Netlify
Electric
Unkey
Sentry
Prisma
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>