sindresorhus/p-queue

If `throwOnTimeout` is `false` - `add()` resolves to undefined

indutny-signal opened this issue · 0 comments

As the title claims the add() method of a p-queue instance will return undefined on timeout and this may not be an issue by itself, if not for the fact that the type declarations make it look like undefined can never be returned:

    add<TaskResultType>(fn: Task<TaskResultType>, options?: Partial<EnqueueOptionsType>): Promise<TaskResultType>;