Skip to content

Support enums #6

@davidcelis

Description

@davidcelis

It would be great if low_type could support enumerated types so we can define arguments or variables that are not only a specific type like String, but a predefined set of strings or values. I'm not really sure what the syntax for this should look like, but just to throw something out there and start the conversation, maybe it could work by providing a type expression to a new enum method that treats default_value as "acceptable values"?

Color = enum String | ["red", "orange", "yellow", "green", "blue", "purple"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions