Comparing version 7.3.3 to 7.3.4
@@ -29,6 +29,6 @@ import EventEmitter from 'eventemitter3'; | ||
*/ | ||
add<TaskResultType>(function_: Task<TaskResultType>, options?: Partial<EnqueueOptionsType>): Promise<TaskResultType | void>; | ||
add<TaskResultType>(function_: Task<TaskResultType>, options: { | ||
throwOnTimeout: true; | ||
} & Exclude<EnqueueOptionsType, 'throwOnTimeout'>): Promise<TaskResultType>; | ||
add<TaskResultType>(function_: Task<TaskResultType>, options?: Partial<EnqueueOptionsType>): Promise<TaskResultType | void>; | ||
/** | ||
@@ -39,6 +39,6 @@ Same as `.add()`, but accepts an array of sync or async functions. | ||
*/ | ||
addAll<TaskResultsType>(functions: ReadonlyArray<Task<TaskResultsType>>, options?: Partial<EnqueueOptionsType>): Promise<Array<TaskResultsType | void>>; | ||
addAll<TaskResultsType>(functions: ReadonlyArray<Task<TaskResultsType>>, options?: { | ||
throwOnTimeout: true; | ||
} & Partial<Exclude<EnqueueOptionsType, 'throwOnTimeout'>>): Promise<TaskResultsType[]>; | ||
addAll<TaskResultsType>(functions: ReadonlyArray<Task<TaskResultsType>>, options?: Partial<EnqueueOptionsType>): Promise<Array<TaskResultsType | void>>; | ||
/** | ||
@@ -45,0 +45,0 @@ Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.) |
@@ -25,2 +25,3 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { | ||
export default class PQueue extends EventEmitter { | ||
// TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()` | ||
constructor(options) { | ||
@@ -27,0 +28,0 @@ var _a, _b, _c, _d; |
{ | ||
"name": "p-queue", | ||
"version": "7.3.3", | ||
"version": "7.3.4", | ||
"description": "Promise queue with concurrency control", | ||
@@ -15,3 +15,3 @@ "license": "MIT", | ||
"build": "del-cli dist && tsc", | ||
"test": "xo && ava", | ||
"test": "xo && ava && del-cli dist && tsc && tsd", | ||
"bench": "node --loader=ts-node/esm bench.ts", | ||
@@ -63,2 +63,3 @@ "prepublishOnly": "del-cli dist && tsc" | ||
"ts-node": "^10.9.1", | ||
"tsd": "^0.25.0", | ||
"typescript": "^4.8.4", | ||
@@ -65,0 +66,0 @@ "xo": "^0.44.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
45298
580
0
15