Skip to content
API/SortParamOptions

SortParamOptions

src/types/sort-param-options.type.tstype

Options for sortParam().

Property Type Description
default readonly object[] The sorts used when the key is absent or unreadable. [] when left out. Every field must be one of fields.
fields readonly F[] | Readonly<Record<string, F>> The API fields the param accepts: a list, where each URL token is the field itself, or a record from URL token to field — { newest: 'publishedAt' }.