The only line in the project that is "partially covered" is line 37 in priority-queue.ts:
|
dequeue(): RunFunction | undefined { |
|
const item = this._queue.shift(); |
|
return item?.run; |
|
} |
This (and the method definition) seem to say that dequeue may return undefined, but when dequeue is actually used this is not the case (because the queue size is checked earlier in that method):
|
this._queue.dequeue()!(); |
I'm not sure the best way to resolve this so created an issue about it instead. Would dequeue ever be expected to return undefined under normal usage? If not, should its result ever be undefined?
The only line in the project that is "partially covered" is line 37 in
priority-queue.ts:p-queue/source/priority-queue.ts
Lines 35 to 38 in 0131f7f
This (and the method definition) seem to say that
dequeuemay returnundefined, but whendequeueis actually used this is not the case (because the queue size is checked earlier in that method):p-queue/source/index.ts
Line 168 in 4b4d2fa
I'm not sure the best way to resolve this so created an issue about it instead. Would
dequeueever be expected to returnundefinedunder normal usage? If not, should its result ever beundefined?