Values 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 `TicketStatus` its wording in every locale. next: Write `open` alone, 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_labelcheck failed: 1 error, 1 file
Markdown for agents: /docs/errors/type.enum_label.md.Built from Jadpo main at a707efb.