diff --git a/frontend/src/scripts/main.ts b/frontend/src/scripts/main.ts index 9d8b19f..e296a91 100644 --- a/frontend/src/scripts/main.ts +++ b/frontend/src/scripts/main.ts @@ -84,36 +84,6 @@ export function onReady(callback: () => void, ...components: TesoftComponent[]) } } -export class Debouncer { - private timer: number | null; - private readonly apply: (...args: T) => void; - - constructor(apply: (...args: T) => void, timeoutMs: number = 300) { - this.timer = null; - this.apply = (...args: T) => { - if (this.timer !== null) { - clearTimeout(this.timer); - this.timer = null; - } - - this.timer = setTimeout(() => { - apply(...args); - }, timeoutMs); - }; - } - - run(...args: T) { - this.apply(...args); - } - - stop() { - if (this.timer !== null) { - clearTimeout(this.timer); - this.timer = null; - } - } -} - export function sendApiPost(path: string, data: Record): Promise { const url = new URL(`/api/${path}`, location.origin);