import { DaffCollectionRequestQueryParamTransform } from '@daffodil/product/routing'
Transforms for storing and retrieving DaffCollectionRequest
values in a route's query params.
interface DaffCollectionRequestQueryParamTransform<T extends DaffCollectionRequestValue = DaffCollectionRequestValue> {
request: (queryParam: string) => T
queryParam: (requestValue: T) => string
}
request (queryParam: string) => T |
---|
A function that is given the value of a query param and returns the value that will be set to the product collection request. |
queryParam (requestValue: T) => string |
---|
A function that is given the value of a product collection request field and returns the value that will be set to the query params. |