A simple priority queue data structure for Node.js and the browser written in TypeScript. Current stable version is 0.4.1. It provides MinPriorityQueue and MaxPriorityQueue implementations with a QueueItem base class for extending with custom properties. The library is minimal and type-safe, but lacks features like custom comparator functions, iteration, or bulk operations found in more mature alternatives. Release cadence is low, with limited recent activity.
npm install priority-queue-tsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a MinPriorityQueue with custom Task items, pushes two items, and pops the highest priority (lowest number).
Ensure all items extending QueueItem assign a `priority` field, otherwise the queue will treat it as undefined.
Define custom properties after calling super().
Migrate to a more maintained library if new features or bug fixes are needed.
Create a class extending QueueItem and instantiate that class.
Add a `priority` property to your class extending QueueItem.
No dependency data recorded yet.