mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 12:36:24 +08:00
feat: leave ui
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
export function debounce(fn: Function, timeout: number) {
|
||||
let timeoutId: any;
|
||||
|
||||
return function (this: any) {
|
||||
clearTimeout(timeoutId);
|
||||
timeoutId = setTimeout(() => fn.apply(this, arguments), timeout);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user