Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 | 32x 110x 29x 29x 10x 10x | export function debounce<F extends (...arguments_: Parameters<F>) => ReturnType<F>>(this: unknown, function_: F, waitInMS = 0) { let timer return (...arguments_: Parameters<F>) => { clearTimeout(timer) timer = setTimeout(() => { function_.apply(this, arguments_) timer = null }, waitInMS) } } |