A TypeScript task queue library (v1.7.1) that wraps async/promise-returning/sync functions into queue-ready functions. Supports sequential (FIFO) and concurrent execution with configurable concurrency limits. Includes ES6 builds (CommonJS and ES modules), optional decorators (@synchronized, @concurrent), sub-queues via tags, and features like inheriting errors from previous tasks, non-blocking execution, and dropping tasks when limit is reached. Fully typed, well-tested, works in Node.js (>=10) and browsers. Differences from other queues: O(1) FIFO performance, decorator support, and fine-grained concurrency control via instance or class methods.
npm install d4c-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a D4C queue instance, wrapping functions, and sequential vs. concurrent execution.
Migrate to promise-based API: use async/await or .then().
Add "experimentalDecorators": true to compilerOptions in tsconfig.json.
Always use the wrapped function for queued execution. Store the returned function and call it.
Use @synchronized and @concurrent (lowercase) instead.
Use 'new D4C()' to create an instance.
Enable 'experimentalDecorators' in tsconfig.json and ensure target >= ES5.
Catch the error and handle gracefully, or increase concurrency limit, or avoid dropping by setting dropWhenReachLimit to false.