UNPKG

use-push-router

Version:

A custom hook that simplifies modifying the search params in Next.js

15 lines (14 loc) 494 B
export type ArgAdd = { [key: string]: string | string[]; }; export type ArgRemove = { [key: string]: string | string[] | undefined; }; export type ArgSet = { [key: string]: string | string[]; }; type UpdateSearchParamsAdd = Record<'add', ArgAdd>; type UpdateSearchParamsRemove = Record<'remove', ArgRemove>; type UpdateSearchParamsSet = Record<'set', ArgSet>; export type UpdateSearchParamsArgs = UpdateSearchParamsSet | UpdateSearchParamsRemove | UpdateSearchParamsAdd; export {};