UNPKG

bknd

Version:

Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.

10 lines (9 loc) 523 B
import { type s } from "../../core/object/schema"; export type UseSearchOptions<Schema extends s.TAnySchema = s.TAnySchema> = { defaultValue?: Partial<s.StaticCoerced<Schema>>; beforeEncode?: (search: Partial<s.StaticCoerced<Schema>>) => object; }; export declare function useSearch<Schema extends s.TAnySchema = s.TAnySchema>(schema: Schema, options?: UseSearchOptions<Schema>): { value: Required<s.StaticCoerced<Schema>>; set: <Update extends Partial<s.StaticCoerced<Schema>>>(update: Update) => void; };