Socket
Socket
Sign inDemoInstall

nice-threads

Package Overview
Dependencies
5
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.2.0

4

package.json

@@ -6,3 +6,3 @@ {

"name": "nice-threads",
"version": "0.1.0",
"version": "0.2.0",
"description": "A promise wrapper for JavaScript Workers, batteries",

@@ -42,2 +42,2 @@ "keywords": [

}
}
}

@@ -1,2 +0,2 @@

export declare class NiceThreadPool<T extends NiceAsync> extends Array<Promised<T>> {
export declare class NiceThreadPool<T extends NiceAsync> extends Array<Promise<Awaited<ReturnType<T>>>> {
#private;

@@ -7,6 +7,6 @@ constructor(worker: T);

call(...args: Parameters<T>): Promise<any>;
all(): Array<Promised<T>>;
all(calls: Parameters<T>[]): Array<Promised<T>>;
allSettled(): Promise<PromiseSettledResult<Promised<T>>>;
allSettled(calls: Parameters<T>[]): Promise<PromiseSettledResult<Promised<T>>>;
all(): Promise<Awaited<ReturnType<T>>[]>;
all(calls: Parameters<T>[]): Promise<Awaited<ReturnType<T>>[]>;
allSettled(): Promise<PromiseSettledResult<Awaited<ReturnType<T>>>[]>;
allSettled(calls: Parameters<T>[]): Promise<PromiseSettledResult<Awaited<ReturnType<T>>>[]>;
clear(): void;

@@ -17,3 +17,1 @@ terminate(): void;

export declare type NiceAsync<Params extends any[] = any[], Result = any> = (...args: Params) => Promise<Result>;
declare type Promised<T extends NiceAsync> = Promise<Awaited<ReturnType<T>>>;
export {};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc