/** * Two-way bind to URL query parameters. */ export declare function useQueryParameters(params: D, options?: UseQueryParametersOptions): UseQueryParametersReturn; /** * Configuration for the {@link useQueryParameters} composable. */ export type UseQueryParametersOptions = { mode?: 'replace' | 'push'; }; /** * Configuration for a single URL query parameter. */ export type QueryParamDefinition = { /** * The data type of the query parameter's value. Since this object needs * to be defined at runtime, primitive constructors are used to indicate * the data type. */ type: StringConstructor | [StringConstructor] | BooleanConstructor; /** * A value that will be used if no query parameter is set. */ defaultValue?: unknown; }; /** * An object wherein the keys are URL query parameter names, and the values at * each key determine the (de)serialization of that parameter (and other behaviors). */ export type QueryParamDefinitionMap = { [K: string]: QueryParamDefinition; }; /** * A mapping from runtime-available primitive constructors, to TS typings which * correspond to the different data types of URL query parameters that this * composable supports. */ export type QueryParamValueType = T extends StringConstructor ? string | undefined : T extends [StringConstructor] ? string[] | undefined : T extends BooleanConstructor ? boolean | undefined : never; /** * The return type of the {@link useQueryParameters} composable. */ export type UseQueryParametersReturn = { [K in keyof M]: QueryParamValueType; };