refactor: silence jsdoc linting warnings
[poolifier.git] / src / priority-queue.ts
index c613cd2e9ee393589a80950bda985bb7004f35ff..18478afefbcb0e90c12f300d07305568f8e4a661 100644 (file)
@@ -40,11 +40,11 @@ export class PriorityQueue<T> {
   ) {
     if (!Number.isSafeInteger(bucketSize)) {
       throw new TypeError(
-        `Invalid bucket size: '${bucketSize}' is not an integer`
+        `Invalid bucket size: '${bucketSize.toString()}' is not an integer`
       )
     }
     if (bucketSize < 0) {
-      throw new RangeError(`Invalid bucket size: ${bucketSize} < 0`)
+      throw new RangeError(`Invalid bucket size: ${bucketSize.toString()} < 0`)
     }
     this.bucketSize = bucketSize
     this.head = this.tail = new FixedPriorityQueue(
@@ -56,6 +56,7 @@ export class PriorityQueue<T> {
 
   /**
    * The priority queue size.
+   * @returns The priority queue size.
    */
   public get size (): number {
     let node: PriorityQueueNode<T> | undefined = this.tail
@@ -84,6 +85,7 @@ export class PriorityQueue<T> {
 
   /**
    * The number of filled prioritized buckets.
+   * @returns The number of filled prioritized buckets.
    */
   public get buckets (): number {
     return Math.trunc(this.size / this.bucketSize)