UNPKG

@appello/common

Version:

Common package with many useful features for web and mobile development

14 lines (13 loc) 588 B
import { AnyObject } from '../../types'; import { DebounceOptions } from '../useDebounce/types'; export interface UseQueryParamsBuilderProps<T extends AnyObject = AnyObject> { requestCb: (params: T) => Promise<any>; defaultParams: T; options?: Pick<DebounceOptions, 'wait'>; } export declare const useQueryParamsBuilder: <T extends AnyObject = AnyObject>({ requestCb, defaultParams, options, }: UseQueryParamsBuilderProps<T>) => { loading: boolean; queryParams: T; updateQueryParams: (params: Partial<T>, withDebounce?: boolean) => void; reset: () => void; };