Skip to content

@shtse8/fluxus v1.0.0


@shtse8/fluxus / src / debounce

Function: debounce()

debounce<T>(func, wait): (...args) => void

Defined in: src/utils/debounce.ts:12

Creates a debounced function that delays invoking the input function until after wait milliseconds have elapsed since the last time the debounced function was invoked.

Type Parameters

T

T extends (...args) => any

A function type that takes any number of arguments and returns any value.

Parameters

func

T

The function to debounce.

wait

number

The number of milliseconds to delay.

Returns

Returns the new debounced function.

(...args): void

Parameters

args

...Parameters<T>

Returns

void

Released under the ISC License.