docs: add documentation on enablePrority priority queue getter/setter
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Thu, 18 Jul 2024 19:03:49 +0000 (21:03 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Thu, 18 Jul 2024 19:03:49 +0000 (21:03 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/queues/priority-queue.ts

index 797aadf9e238f16f9c7336a4a11703c229a79d59..6b1fd308a55ff320e3f14aefecaacb0320a7f9a8 100644 (file)
@@ -59,10 +59,18 @@ export class PriorityQueue<T> {
     return size
   }
 
+  /**
+   * Whether priority is enabled.
+   * @returns Whether priority is enabled.
+   */
   public get enablePriority (): boolean {
     return this.priorityEnabled
   }
 
+  /**
+   * Enables/disables priority.
+   * @param enablePriority - Whether to enable priority.
+   */
   public set enablePriority (enablePriority: boolean) {
     if (this.priorityEnabled === enablePriority) {
       return