ts
import { ParamConfig } from '@trail-run/core/reactive/query-params';Interface: ParamConfig
Defined in: src/reactive/query-params.ts:9
Configuration options for fields that are also query parameters
Properties
deserialize()
ts
deserialize: (urlValue, instance) => unknown;Defined in: src/reactive/query-params.ts:19
Convert a string value from the URL back into its original type
Parameters
urlValue
string
instance
any
Returns
unknown
getDefault()?
ts
optional getDefault: (instance) => unknown;Defined in: src/reactive/query-params.ts:29
Get the default value for this param from the given instance.
If not present, the value passed to the field initializer will be used as the default.
This should return the value in the field's native type, not the serialized URL form.
Parameters
instance
any
Returns
unknown
serialize()
ts
serialize: (value, instance) => string | null;Defined in: src/reactive/query-params.ts:14
Convert a value into a string for storage in the URL. null indicates the value should be omitted from the URL.
Parameters
value
unknown
instance
any
Returns
string | null