From 65c178f18dbb814d8f15aec51c993e2ed1f79901 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 28 May 2024 19:57:56 +0200 Subject: [PATCH] fix: add missing exports MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/fixed-priority-queue.ts | 8 ++++---- src/index.ts | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/fixed-priority-queue.ts b/src/fixed-priority-queue.ts index 2424b652..b50853dd 100644 --- a/src/fixed-priority-queue.ts +++ b/src/fixed-priority-queue.ts @@ -4,12 +4,12 @@ export const defaultQueueSize = 2048 /** - * Priority queue node. + * Fixed priority queue node. * * @typeParam T - Type of priority queue node data. * @internal */ -interface PriorityQueueNode { +export interface FixedPriorityQueueNode { data: T priority: number } @@ -22,7 +22,7 @@ interface PriorityQueueNode { */ export class FixedPriorityQueue { private start!: number - private readonly nodeArray: Array> + private readonly nodeArray: Array> public readonly capacity: number public size!: number public maxSize!: number @@ -36,7 +36,7 @@ export class FixedPriorityQueue { constructor (size: number = defaultQueueSize) { this.checkSize(size) this.capacity = size - this.nodeArray = new Array>(this.capacity) + this.nodeArray = new Array>(this.capacity) this.clear() } diff --git a/src/index.ts b/src/index.ts index fae19abd..5f502d2a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,8 @@ export type { CircularBuffer } from './circular-buffer.js' +export type { + FixedPriorityQueue, + FixedPriorityQueueNode +} from './fixed-priority-queue.js' export type { AbstractPool } from './pools/abstract-pool.js' export { DynamicClusterPool } from './pools/cluster/dynamic.js' export type { ClusterPoolOptions } from './pools/cluster/fixed.js' -- 2.34.1