From: Jérôme Benoit Date: Tue, 28 May 2024 17:57:56 +0000 (+0200) Subject: fix: add missing exports X-Git-Tag: v4.0.13~7 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;ds=sidebyside;h=65c178f18dbb814d8f15aec51c993e2ed1f79901;p=poolifier.git fix: add missing exports Signed-off-by: Jérôme Benoit --- 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'