UNPKG

react-google-geocoding

Version:

A lightweight wrapper around Google Places Autocomplete and Directions APIs.

14 lines (13 loc) 521 B
type DebounceOptions = { leading?: boolean; trailing?: boolean; maxWait?: number; }; type ControlFunctions = { cancel: () => void; flush: () => void; isPending: () => boolean; }; export type DebouncedState<T extends (...args: any) => ReturnType<T>> = ((...args: Parameters<T>) => ReturnType<T> | undefined) & ControlFunctions; export declare function useDebounceCallback<T extends (...args: any) => ReturnType<T>>(func: T, delay?: number, options?: DebounceOptions): DebouncedState<T>; export {};