![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@types/promise-queue
Advanced tools
TypeScript definitions for promise-queue
npm install --save @types/promise-queue
This package contains type definitions for promise-queue (https://github.com/azproduction/promise-queue).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/promise-queue.
export = PromiseQueue;
declare class PromiseQueue {
/**
* @param maxPendingPromises [Infinity] Number of promises that can run at once.
* @param maxQueuedPromises [Infinity] Number of promises generators that can be in the queue at once.
* `add()` will return a rejected promise if this limit would be exceeded.
* @param options [{}] See QueueOptions
*/
constructor(maxPendingPromises?: number, maxQueuedPromises?: number, options?: PromiseQueue.QueueOptions);
/**
* Enqueue a promise generator. When the number of running promises is less than `maxPendingPromises`,
* this function will be called and the returned promise will be held as a running promise until it
* rejects or resolves.
*
* @throws If the global `Promise` is undefined and `Queue.configure` hasn't been called.
* @param promiseGenerator A function that returns a promise when called.
* @returns A promise that forwards the resolution/rejection of the promise returned by `promiseGenerator`,
* or immediately rejects if `maxQueuedPromise` is exceeded.
*/
add<T>(promiseGenerator: () => Promise<T>): Promise<T>;
/**
* Returns the number of promiseGenerators waiting in queue.
*/
getPendingLength(): number;
/**
* Returns the number of in-flight promises
*/
getQueueLength(): number;
/**
* Set which promise constructor to use for the value returned by PromiseQueue#add.
* If this isn't called, the global `Promise` constructor is used.
* @param GlobalPromise A constructor for Promises
*/
static configure(GlobalPromise: PromiseConstructor): void;
}
declare namespace PromiseQueue {
interface QueueOptions {
/**
* Callback that is called when the queue is empty and all pending promises have resolved
*/
onEmpty(): void;
}
}
These definitions were written by Lachlan Stuart.
FAQs
TypeScript definitions for promise-queue
The npm package @types/promise-queue receives a total of 2,812 weekly downloads. As such, @types/promise-queue popularity was classified as popular.
We found that @types/promise-queue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.