ts-task-queue is a TypeScript library for creating and managing task queues with a pool of worker threads. Version 2.0.0 provides a simple API based on the `Queue` class, supporting typed task input/output, customizable worker count (default 4), error handling, and multiple queues. It leverages Node.js worker threads for parallel execution and requires the `isMainThread()` guard to separate main and worker code. Unlike generic job queues, it focuses on lightweight in-process threading with TypeScript-first design. The package ships with TypeScript types and is ESM-compatible.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Default import is not supported. Must use named import.
Using CommonJS `require` returns an object with named exports; must destructure: `const { Queue } = require('ts-task-queue')`.
Aliasing is valid but unnecessary.
Creates a typed queue for adding two numbers, pushes a task, and logs the result. Demonstrates Queue instantiation, callback, and isMainThread() guard.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.