You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The VSCode JSON schema integration supports a custom field enumDescriptions to describe each enum value individually. This is used by various other editors as well. It would be neat if Zod supports this field too, for example:
constkin=z.enum(['elf','dwarf','human']).describe('Your character lineage',['Elves are a magical people of otherworldly grace','Bold and hardy, dwarves are known as skilled warriors, miners, and workers of stone and metal','Humans are the most adaptable and ambitious people among the common kin'])console.log(kin.enumDescriptions)// [// 'Elves are a magical people of otherworldly grace',// 'Bold and hardy, dwarves are known as skilled warriors, miners, and workers of stone and metal',// 'Humans are the most adaptable and ambitious people among the common kin'// ]
The text was updated successfully, but these errors were encountered:
The VSCode JSON schema integration supports a custom field
enumDescriptions
to describe each enum value individually. This is used by various other editors as well. It would be neat if Zod supports this field too, for example:The text was updated successfully, but these errors were encountered: