Untitled
class Queue { constructor(callback) { if (typeof callback !== 'function') throw new Error('Queue handler can be only a function'); this.handler = callback; } push(promise) { if(!(promise instanceof Promise)) throw new Error('Only promise can be pushed to Queue'); } }