export type Job = () => PromiseLike | T; export type Value = Promise | T; export type JobHandler = { push(job: Job): Promise; drain(): Promise; onEmpty(callback: () => void): () => void; clear(): void; } & Record;