We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
useSearchParams
wouter-preact
1 parent e06a29f commit dcb09d1Copy full SHA for dcb09d1
packages/wouter-preact/types/index.d.ts
@@ -178,6 +178,19 @@ export function useSearch<
178
H extends BaseSearchHook = BrowserSearchHook
179
>(): ReturnType<H>;
180
181
+export type URLSearchParamsInit = ConstructorParameters<
182
+ typeof URLSearchParams
183
+>[0];
184
+
185
+export type SetSearchParams = (
186
+ nextInit:
187
+ | URLSearchParamsInit
188
+ | ((prev: URLSearchParams) => URLSearchParamsInit),
189
+ options?: { replace?: boolean; state?: any }
190
+) => void;
191
192
+export function useSearchParams(): [URLSearchParams, SetSearchParams];
193
194
export function useParams<T = undefined>(): T extends string
195
? StringRouteParams<T>
196
: T extends undefined
0 commit comments