Here, you’ll find a comprehensive list of all types supported by the Typesync specification. Typesync’s powerful type system is designed to support a wide array of complex and useful types.
UserRole:model: aliasdocs: Represents a user's role within a project. type:type: enum members:-label: Ownervalue: owner-label: Adminvalue: admin-label: Membervalue: member
Represents a union of multiple types. Typesync supports two types of unions: simple union and discriminated union. Both are defined in the same way using variants, except a discriminated union definition has a discriminant key and requires every variant to be of object (or alias resolving to object) type.
Simple Union Example
Path:model: alias type:type: union variants:- string-type: listelementType: string
Discriminated Union Example
Cat:model: alias type:type: object fields: type: type:type: literalvalue: cat name:type: string lives_left:type: intDog:model: alias type:type: object fields: type: type:type: literalvalue: dog name:type: string breed:type: stringPet:model: alias type:type: uniondiscriminant: type variants:- Cat- Dog