@types/bluebird
Advanced tools
Comparing version 3.5.25 to 3.5.26
@@ -40,4 +40,2 @@ // Type definitions for bluebird 3.5 | ||
type CatchFilter<E> = ((error: E) => boolean) | (object & E); | ||
type IterableItem<R> = R extends Iterable<infer U> ? U : never; | ||
type IterableOrNever<R> = Extract<R, Iterable<any>>; | ||
type Resolvable<R> = R | PromiseLike<R>; | ||
@@ -356,3 +354,3 @@ type IterateFunction<T, R> = (item: T, index: number, arrayLength: number) => Resolvable<R>; | ||
*/ | ||
call<U extends keyof R>(propertyName: U, ...args: any[]): Bluebird<R[U] extends (...args: any[]) => any ? ReturnType<R[U]> : never>; | ||
call<U extends keyof Q, Q>(this: Bluebird<Q>, propertyName: U, ...args: any[]): Bluebird<Q[U] extends (...args: any[]) => any ? ReturnType<Q[U]> : never>; | ||
@@ -567,3 +565,3 @@ /** | ||
*/ | ||
spread<U>(fulfilledHandler: (...values: Array<IterableItem<R>>) => Resolvable<U>): Bluebird<U>; | ||
spread<U, Q>(this: Bluebird<R & Iterable<Q>>, fulfilledHandler: (...values: Q[]) => Resolvable<U>): Bluebird<U>; | ||
@@ -573,5 +571,10 @@ /** | ||
*/ | ||
all(): Bluebird<IterableOrNever<R>>; | ||
all(this: Bluebird<Iterable<{}>>): Bluebird<R>; | ||
/** | ||
* Same as calling `Promise.all(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. | ||
*/ | ||
all(): Bluebird<never>; | ||
/** | ||
* Same as calling `Promise.props(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. | ||
@@ -585,18 +588,35 @@ */ | ||
*/ | ||
any(): Bluebird<IterableItem<R>>; | ||
any<Q>(this: Bluebird<R & Iterable<Q>>): Bluebird<Q>; | ||
/** | ||
* Same as calling `Promise.any(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. | ||
*/ | ||
any(): Bluebird<never>; | ||
/** | ||
* Same as calling `Promise.some(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. | ||
* Same as calling `Promise.some(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. | ||
*/ | ||
some(count: number): Bluebird<IterableOrNever<R>>; | ||
some(this: Bluebird<Iterable<{}>>, count: number): Bluebird<R>; | ||
/** | ||
* Same as calling `Promise.some(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. | ||
* Same as calling `Promise.some(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. | ||
*/ | ||
some(count: number): Bluebird<never>; | ||
/** | ||
* Same as calling `Promise.race(thisPromise, count)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. | ||
*/ | ||
race(): Bluebird<IterableItem<R>>; | ||
race<Q>(this: Bluebird<R & Iterable<Q>>): Bluebird<Q>; | ||
/** | ||
* Same as calling `Promise.race(thisPromise, count)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. | ||
*/ | ||
race(): Bluebird<never>; | ||
/** | ||
* Same as calling `Bluebird.map(thisPromise, mapper)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. | ||
*/ | ||
map<U>(mapper: IterateFunction<IterableItem<R>, U>, options?: Bluebird.ConcurrencyOption): Bluebird<R extends Iterable<any> ? U[] : never>; | ||
map<U, Q>(this: Bluebird<R & Iterable<Q>>, mapper: IterateFunction<Q, U>, options?: Bluebird.ConcurrencyOption): Bluebird<U[]>; | ||
@@ -606,3 +626,3 @@ /** | ||
*/ | ||
reduce<U>(reducer: (memo: U, item: IterableItem<R>, index: number, arrayLength: number) => Resolvable<U>, initialValue?: U): Bluebird<R extends Iterable<any> ? U : never>; | ||
reduce<U, Q>(this: Bluebird<R & Iterable<Q>>, reducer: (memo: U, item: Q, index: number, arrayLength: number) => Resolvable<U>, initialValue?: U): Bluebird<U>; | ||
@@ -612,3 +632,3 @@ /** | ||
*/ | ||
filter(filterer: IterateFunction<IterableItem<R>, boolean>, options?: Bluebird.ConcurrencyOption): Bluebird<IterableOrNever<R>>; | ||
filter<Q>(this: Bluebird<R & Iterable<Q>>, filterer: IterateFunction<Q, boolean>, options?: Bluebird.ConcurrencyOption): Bluebird<R>; | ||
@@ -618,3 +638,3 @@ /** | ||
*/ | ||
each(iterator: IterateFunction<IterableItem<R>, any>): Bluebird<IterableOrNever<R>>; | ||
each<Q>(this: Bluebird<R & Iterable<Q>>, iterator: IterateFunction<Q, any>): Bluebird<R>; | ||
@@ -624,3 +644,3 @@ /** | ||
*/ | ||
mapSeries<U>(iterator: IterateFunction<IterableItem<R>, U>): Bluebird<R extends Iterable<any> ? U[] : never>; | ||
mapSeries<U, Q>(this: Bluebird<R & Iterable<Q>>, iterator: IterateFunction<Q, U>): Bluebird<U[]>; | ||
@@ -627,0 +647,0 @@ /** |
{ | ||
"name": "@types/bluebird", | ||
"version": "3.5.25", | ||
"version": "3.5.26", | ||
"description": "TypeScript definitions for bluebird", | ||
@@ -17,8 +17,9 @@ "license": "MIT", | ||
"type": "git", | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", | ||
"directory": "types/bluebird" | ||
}, | ||
"scripts": {}, | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "84f287bba570664e8a87b6b30953506fa39d74685adb9b86fb0389dad064398f", | ||
"typesPublisherContentHash": "439dfc95779e0f71e76418e49001d4306184faeca0d91e7783f8f97527817896", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -5,3 +5,3 @@ # Installation | ||
# Summary | ||
This package contains type definitions for bluebird (https://github.com/petkaantonov/bluebird). | ||
This package contains type definitions for bluebird ( https://github.com/petkaantonov/bluebird ). | ||
@@ -12,3 +12,3 @@ # Details | ||
Additional Details | ||
* Last updated: Thu, 13 Dec 2018 21:05:14 GMT | ||
* Last updated: Tue, 26 Feb 2019 17:01:53 GMT | ||
* Dependencies: none | ||
@@ -15,0 +15,0 @@ * Global values: none |
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
55318
1143