Documentation
Framework
Version
Class References
Function References
Interface References
Type Alias References
Variable References

ModalitiesArrayToUnion

Type Alias: ModalitiesArrayToUnion<T>

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

Defined in: types.ts:133

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>