API/enumParam
enumParam
src/params/enum-param.tsfunction
enumParam()
Section titled “enumParam()”enumParam(key: string, values: EnumValues<T>, options: EnumParamOptions<NoInfer<T>> & object): ListParam<T>A param holding one of a fixed set of strings — a status, a view.
values is a string enum object or a tuple. Reads one value that is one of
them, exactly; anything else, or a key given twice, falls back to the
default.
| Parameter | Type | Description |
|---|---|---|
key |
string |
The page-URL key |
values |
EnumValues<T> |
The accepted values |
options |
EnumParamOptions<NoInfer<T>> & object |
The default |
Returns — The param
