Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@endo/promise-kit

Package Overview
Dependencies
Maintainers
5
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@endo/promise-kit - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

8

index.d.ts

@@ -17,9 +17,9 @@ /**

*
* @template T
* @param {Iterable<T>} values An iterable of Promises.
* @returns {Promise<Awaited<T>>} A new Promise.
* @template {readonly unknown[] | []} T
* @param {T} values An iterable of Promises.
* @returns {Promise<Awaited<T[number]>>} A new Promise.
*/
export function racePromises<T>(values: Iterable<T>): Promise<Awaited<T>>;
export function racePromises<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
export * from "./src/is-promise.js";
export * from "./src/types.js";
//# sourceMappingURL=index.d.ts.map

@@ -43,5 +43,5 @@ /* global globalThis */

*
* @template T
* @param {Iterable<T>} values An iterable of Promises.
* @returns {Promise<Awaited<T>>} A new Promise.
* @template {readonly unknown[] | []} T
* @param {T} values An iterable of Promises.
* @returns {Promise<Awaited<T[number]>>} A new Promise.
*/

@@ -48,0 +48,0 @@ export function racePromises(values) {

{
"name": "@endo/promise-kit",
"version": "1.1.4",
"version": "1.1.5",
"description": "Helper for making promises",

@@ -41,3 +41,3 @@ "keywords": [

"dependencies": {
"ses": "^1.7.0"
"ses": "^1.8.0"
},

@@ -54,3 +54,3 @@ "devDependencies": {

"prettier": "^3.2.5",
"typescript": "5.5.2"
"typescript": "~5.6.1-rc"
},

@@ -85,3 +85,3 @@ "files": [

},
"gitHead": "444c81ad3ecc1b0a449023a9c65e9be2fa17db21"
"gitHead": "cb060b7e22c92cc951fb03d86cdbceeae82fec34"
}

@@ -20,9 +20,9 @@ export { race as memoRace };

*
* @template T
* @template {readonly unknown[] | []} T
* @template {PromiseConstructor} [P=PromiseConstructor]
* @this {P}
* @param {Iterable<T>} values An iterable of Promises.
* @returns {Promise<Awaited<T>>} A new Promise.
* @param {T} values An iterable of Promises.
* @returns {Promise<Awaited<T[number]>>} A new Promise.
*/
declare function race<T, P extends PromiseConstructor = PromiseConstructor>(this: P, values: Iterable<T>): Promise<Awaited<T>>;
declare function race<T extends readonly unknown[] | [], P extends PromiseConstructor = PromiseConstructor>(this: P, values: T): Promise<Awaited<T[number]>>;
//# sourceMappingURL=memo-race.d.ts.map

@@ -114,11 +114,12 @@ /*

*
* @template T
* @template {readonly unknown[] | []} T
* @template {PromiseConstructor} [P=PromiseConstructor]
* @this {P}
* @param {Iterable<T>} values An iterable of Promises.
* @returns {Promise<Awaited<T>>} A new Promise.
* @param {T} values An iterable of Promises.
* @returns {Promise<Awaited<T[number]>>} A new Promise.
*/
race(values) {
let deferred;
/** @type {T[]} */
/** @type {[...T]} */
// @ts-expect-error filled by the loop
const cachedValues = [];

@@ -125,0 +126,0 @@ const C = this;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc