docs: refine changelog entries
[poolifier.git] / src / circular-array.ts
index 8adf4b5fb6ec2a49b3d2e0e3e0d6fe4e6237c5a7..40bd19ae0fc74742380979fe05712a5e962251c6 100644 (file)
@@ -3,7 +3,7 @@
 const DEFAULT_CIRCULAR_ARRAY_SIZE = 1024
 
 /**
- * Array with a maximum length shifting items when full.
+ * Array with a maximum length and shifting items when full.
  */
 export class CircularArray<T> extends Array<T> {
   public size: number
@@ -17,6 +17,7 @@ export class CircularArray<T> extends Array<T> {
     }
   }
 
+  /** @inheritDoc */
   public push (...items: T[]): number {
     const length = super.push(...items)
     if (length > this.size) {
@@ -25,6 +26,7 @@ export class CircularArray<T> extends Array<T> {
     return this.length
   }
 
+  /** @inheritDoc */
   public unshift (...items: T[]): number {
     const length = super.unshift(...items)
     if (length > this.size) {
@@ -33,6 +35,7 @@ export class CircularArray<T> extends Array<T> {
     return this.length
   }
 
+  /** @inheritDoc */
   public concat (...items: Array<T | ConcatArray<T>>): CircularArray<T> {
     const concatenatedCircularArray = super.concat(
       items as T[]
@@ -47,6 +50,7 @@ export class CircularArray<T> extends Array<T> {
     return concatenatedCircularArray
   }
 
+  /** @inheritDoc */
   public splice (start: number, deleteCount?: number, ...items: T[]): T[] {
     let itemsRemoved: T[]
     if (arguments.length >= 3 && deleteCount !== undefined) {