API Reference

A debounced version of a function that is returned from debounce

type DebouncedFunction<T extends Func> = { (...args: Parameters<T>): Promise<ReturnType<T> | undefined> clear: () => void flush: () => Promise<ReturnType<T> | undefined> }

When executed, the debounced function returns a Promise that resolves to the return value of the original function once executed or undefined if the function is not run.