@types/when
Advanced tools
Comparing version 2.4.27 to 2.4.28
@@ -105,2 +105,36 @@ // Type definitions for When 2.4.0 | ||
/** | ||
* Promise-aware array map function, similar to `Array.prototype.map()`, | ||
* but input array may contain promises or values. | ||
* @param promisesOrValues array of anything, may contain a mix of {@link Promise}s and values | ||
* @param mapFunc map function which may return a promise or value | ||
* @returns a promise that will fulfill with an array of mapped values | ||
* or reject if any input promise rejects. | ||
*/ | ||
function map<T>(promisesOrValues: any[], mapFunc: (value: any, index?: Number) => any): Promise<T>; | ||
/** | ||
* Traditional reduce function, similar to `Array.prototype.reduce()`, but | ||
* input may contain promises and/or values, and reduceFunc | ||
* may return either a value or a promise, *and* initialValue may | ||
* be a promise for the starting value. | ||
* @param promisesOrValues array or promise for an array of anything, | ||
* may contain a mix of promises and values. | ||
* @param reduceFunc function(accumulated:*, x:*, index:Number):*} f reduce function | ||
* @returns a promise that will resolve to the final reduced value | ||
*/ | ||
function reduce<T>(promisesOrValues: any[], reduceFunc: (reduction: T, value: any, index?: Number) => T | Promise<T>, initialValue: T): Promise<T>; | ||
/** | ||
* Traditional reduce function, similar to `Array.prototype.reduceRight()`, but | ||
* input may contain promises and/or values, and reduceFunc | ||
* may return either a value or a promise, *and* initialValue may | ||
* be a promise for the starting value. | ||
* @param promisesOrValues array or promise for an array of anything, | ||
* may contain a mix of promises and values. | ||
* @param reduceFunc function(accumulated:*, x:*, index:Number):*} f reduce function | ||
* @returns a promise that will resolve to the final reduced value | ||
*/ | ||
function reduceRight<T>(promisesOrValues: any[], reduceFunc: (reduction: T, value: any, index?: Number) => T | Promise<T>, initialValue: T): Promise<T>; | ||
/** | ||
* Describes the status of a promise. | ||
@@ -107,0 +141,0 @@ * state may be one of: |
{ | ||
"name": "@types/when", | ||
"version": "2.4.27", | ||
"version": "2.4.28", | ||
"description": "TypeScript definitions for When 2.4.0", | ||
@@ -14,4 +14,5 @@ "license": "MIT", | ||
"dependencies": {}, | ||
"peerDependencies": {}, | ||
"typings": "index.d.ts", | ||
"typesPublisherContentHash": "19e09c38413e0210a13124a7edef6eaa84c639e103651b287d6040efdea10474" | ||
"typesPublisherContentHash": "c1b74dd8ccc88c962f698aa9d13c515131e45c808287ff6ac5147a277aa3c6e2" | ||
} |
@@ -11,4 +11,4 @@ # Installation | ||
Additional Details | ||
* Last updated: Mon, 19 Sep 2016 17:28:59 GMT | ||
* File structure: MultipleModules | ||
* Last updated: Wed, 26 Oct 2016 19:23:32 GMT | ||
* File structure: ModuleAugmentation | ||
* Library Dependencies: none | ||
@@ -15,0 +15,0 @@ * Module Dependencies: none |
@@ -13,3 +13,3 @@ { | ||
"sourceBranch": "types-2.0", | ||
"kind": "MultipleModules", | ||
"kind": "ModuleAugmentation", | ||
"globals": [ | ||
@@ -26,3 +26,3 @@ "When" | ||
"hasPackageJson": false, | ||
"contentHash": "19e09c38413e0210a13124a7edef6eaa84c639e103651b287d6040efdea10474" | ||
"contentHash": "c1b74dd8ccc88c962f698aa9d13c515131e45c808287ff6ac5147a277aa3c6e2" | ||
} |
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
19324
331
0