mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 11:44:40 +00:00
format: run prettify
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
export default function debounce<T extends (...args: any[]) => void>(fn: T, delay: number): (...args: Parameters<T>) => void {
|
||||
export default function debounce<T extends (...args: any[]) => void>(
|
||||
fn: T,
|
||||
delay: number,
|
||||
): (...args: Parameters<T>) => void {
|
||||
let timeout: ReturnType<typeof setTimeout>;
|
||||
return function(this: ThisParameterType<T>, ...args: Parameters<T>) {
|
||||
return function (this: ThisParameterType<T>, ...args: Parameters<T>) {
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(() => fn.apply(this, args), delay);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user