mirror of
https://github.com/louislam/dockge.git
synced 2025-08-10 03:57:49 +02:00
Check TypeScript for backend (#64)
* Check Typescript * Fix backend typescript issues * Update
This commit is contained in:
@ -4,14 +4,14 @@
|
||||
*/
|
||||
export class LimitQueue<T> extends Array<T> {
|
||||
__limit;
|
||||
__onExceed = null;
|
||||
__onExceed? : (item : T | undefined) => void;
|
||||
|
||||
constructor(limit: number) {
|
||||
super();
|
||||
this.__limit = limit;
|
||||
}
|
||||
|
||||
push(value : T) {
|
||||
pushItem(value : T) {
|
||||
super.push(value);
|
||||
if (this.length > this.__limit) {
|
||||
const item = this.shift();
|
||||
|
Reference in New Issue
Block a user