Release 4.0.0-beta.3
Pre-release
Pre-release
4.0.0-beta.3 (2024-04-05)
Breaking:
- add initQueue and addQueueTask to Printer class
So now, to use your queue engine, or remove it completely, you can extend from the Printer class and override two methods:
initQueue and addQueueTask
For instance, with this code, the p-queue won't be bundled.
class CustomQueuPrinter extends Printer {
initQueue() {} // keep init clear
addQueueTask<T>(task: () => Promise<T>) { noop function
return task(); //
}
}
Or you can implement these two methods with your engine:
class CustomQueuPrinter extends Printer {
initQueue() {
this.queue = new CustomQueue()
}
addQueueTask<T>(task: () => Promise<T>) {
return this.queue.push(task) // or any other logic you need
}
}
Fixes
- add all printer constants to be possible to import from the lib