ErrorsValues and types · rule
type.enum_label
Enum variant is given a label or a value.
Area 2, Values and types; not declinable; the next step is usually the agent's.
Enums have no display labels: a variant is a name, or a name with a block of its fields. Its wording lives in the domain's translations (area 10, "Enums with wording"):
type TicketStatus = Enum { open: "Open" closed}
error TicketStatus.open is given a label
--> main.jadpo:2:11
|2 | open: "Open" | ^^^^^^ a label
- reason
- Enums have no display labels: a variant is a name, or a name with a block of its fields. Wording for readers lives in the domain's translations, which give each value of
TicketStatusits wording in every locale. - next
- Write
openalone, and give its wording in the domain's translations:ticket_status: { open: "Open" }(agent) - rule
- type.
enum_ label - help
- https://jadpo.
dev/docs/errors/type. enum_ label
Markdown for agents: /docs/errors/type.enum_label.md.Built from Jadpo main at aee2e8f.