export const DEFAULT_CIRCULAR_ARRAY_SIZE = 2000;
+/** Array with a maximum length shifting items when full. */
export class CircularArray<T> extends Array<T> {
public size: number;
if (length > this.size) {
super.splice(this.size, items.length);
}
- return length;
+ return this.length;
}
public concat(...items: (T | ConcatArray<T>)[]): CircularArray<T> {