Skip to main content

Interface: DebouncedFunction()<T>

Defined in: use-debounced-callback.ts:21

A debounced function returned by useDebouncedCallback, with controls to manage the pending call.

Type Parameters​

T​

T extends (...args) => void

The type of the callback that was debounced.

DebouncedFunction(...args): void

Defined in: use-debounced-callback.ts:25

A debounced function returned by useDebouncedCallback, with controls to manage the pending call.

Parameters​

args​

...Parameters<T>

Returns​

void

Properties​

cancel​

cancel: () => void

Defined in: use-debounced-callback.ts:27

Discard the pending call, if any.

Returns​

void


flush​

flush: () => void

Defined in: use-debounced-callback.ts:29

Invoke the pending call immediately, if any.

Returns​

void


isPending​

isPending: () => boolean

Defined in: use-debounced-callback.ts:31

Whether a call is currently waiting to be invoked.

Returns​

boolean