Untitled
unknown
plain_text
2 years ago
307 B
5
Indexable
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'); } }
Editor is loading...