@internal
()
| 1044 | * |
| 1045 | * **Details** |
| 1046 | * |
| 1047 | * Holds `enums` as an array of `[name, value]` pairs where values are |
| 1048 | * `string | number`. Parsing succeeds when the input matches any enum value. |
| 1049 | * |
| 1050 | * @see {@link isEnum} |
| 1051 | * @category models |
| 1052 | * @since 4.0.0 |
| 1053 | */ |
| 1054 | export class Enum extends Base { |
| 1055 | readonly _tag = "Enum" |
| 1056 | readonly enums: ReadonlyArray<readonly [string, string | number]> |
| 1057 | |
| 1058 | constructor( |
| 1059 | enums: ReadonlyArray<readonly [string, string | number]>, |
| 1060 | annotations?: Schema.Annotations.Annotations, |
| 1061 | checks?: Checks, |
| 1062 | encoding?: Encoding, |
| 1063 | context?: Context |