build(deps-dev): apply updates
[poolifier.git] / src / circular-array.ts
index dadfa950043577a66d50387e59af621045bad66e..511b699c8827a2a214efe63e2fce9dfabfcee73a 100644 (file)
@@ -1,9 +1,12 @@
-// Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
 
-const DEFAULT_CIRCULAR_ARRAY_SIZE = 1024
+export const DEFAULT_CIRCULAR_ARRAY_SIZE = 1024
 
 /**
  * Array with a maximum length and shifting items when full.
+ *
+ * @typeParam T - Type of items.
+ * @internal
  */
 export class CircularArray<T> extends Array<T> {
   public size: number
@@ -57,7 +60,7 @@ export class CircularArray<T> extends Array<T> {
     ...items: T[]
   ): CircularArray<T> {
     let itemsRemoved: T[] = []
-    if (arguments.length >= 3 && deleteCount !== undefined) {
+    if (arguments.length >= 3 && deleteCount != null) {
       itemsRemoved = super.splice(start, deleteCount, ...items)
       if (this.length > this.size) {
         const itemsOverflowing = super.splice(0, this.length - this.size)