Tankōbon / lib/trailing-debounce / createTrailingDebounce
Function: createTrailingDebounce()
createTrailingDebounce<
T>(run,delayMs):TrailingDebounce<T>
Defined in: lib/trailing-debounce.ts:21
Calls run with the last value given to schedule() once delayMs passed without another one. flush() runs it at once: the reader's close must save the page it is on, not the one it was on 400 ms earlier.
Type Parameters
T
T
Parameters
run
(value) => void
delayMs
number