Closed indutny-signal closed 1 year ago
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()
undefined
add<TaskResultType>(fn: Task<TaskResultType>, options?: Partial<EnqueueOptionsType>): Promise<TaskResultType>;
As the title claims the
add()
method of a p-queue instance will returnundefined
on timeout and this may not be an issue by itself, if not for the fact that the type declarations make it look likeundefined
can never be returned: