debounce
debounce<
T
,V
>(cb
,timeout
?,resetTimer
?):Debouncer
<T
,V
>
Defined in: obsidian.d.ts:1101
A standard debounce function. Use this to have a time-delayed function only be called once in a given timeframe.
Type Parameters
• T extends unknown
[]
• V
Parameters
cb
(…args
) => V
The function to call.
timeout?
number
The timeout to wait, in milliseconds
resetTimer?
boolean
Whether to reset the timeout when the debouncer is called again.
Returns
Debouncer
<T
, V
>
a debounced function that takes the same parameter as the original function.