UNPKG

svelte-query-params

Version:

A lightweight, dead-simple, type-safe reactive query parameter store built for Svelte 5.

14 lines (11 loc) 913 B
import { Q as QuerySchema, a as QueryParamsOptions, U as UseQueryHook, i as inferShape } from './types-Cewx0UBF.cjs'; export { F as FunctionValidator, f as FunctionValueValidator, b as Query, d as QueryHelpers, e as QueryHook, c as QueryValue, S as Serializer, j as URLLike, V as ValibotValidator, g as Validator, W as WindowLike, Z as ZodValidator, h as inferFromValidator } from './types-Cewx0UBF.cjs'; import 'valibot'; import 'zod'; /** * This returns a function (a hook) rather than a reactive object as the * reactivity is lost when importing the underlying reactive object around * @returns A hook, returning a reactive {@linkcode QueryHelpers} instance */ declare function createUseQueryParams<TShape extends QuerySchema>(validators: TShape, options?: QueryParamsOptions): UseQueryHook<inferShape<TShape>>; export { QueryParamsOptions, QuerySchema, UseQueryHook, createUseQueryParams, inferShape };