Choices

Restrict values to a list of allowed choices.

Usage

enum is a nonempty array of quoted strings or integers. Values must match one of the choices. With an integer or port type, choices compare numerically; other choices compare exactly. When combined with a type, every choice must satisfy that type.

Enum strings support escaped quotes, backslashes, and \n, \r, and \t. Arrays and proxy objects may have a trailing comma. A declaration cannot end with a trailing comma.

env "NODE_ENV", enum: ["development", "test", "production"]

No choices are imposed by default.