first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
/**
* Queue that is flushed automatically when it reaches some item limit
* or when timeout is reached.
*/
export declare class TimedQueue<T> {
/**
* Queue will be flushed when it reaches this number of items.
*/
itemLimit: number;
/**
* Queue will be flushed after this many milliseconds.
*/
timeLimit: number;
/**
* Method that will be called when queue is flushed.
*/
onFlush: (list: T[]) => void;
private list;
private timer;
push(item: T): void;
flush(): T[];
}