import type { DebounceAndThrottleOptions, DebounceAndThrottleProcedureResult, DebounceAndThrottleProcedure, } from './types'; import { // throttle, useThrottle, } from './useThrottle'; /** * @description: Applicable in components */ export function useDebounce( handle: DebounceAndThrottleProcedure, wait: number, options: DebounceAndThrottleOptions = {} ): DebounceAndThrottleProcedureResult { return useThrottle( handle, wait, Object.assign(options, { debounce: true, }) ); }