mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 05:20:24 +08:00
Merge pull request #19624 from k7sleeper/fix-bluebird
bluebird: Replaced Thenable by PromiseLike
This commit is contained in:
@@ -590,9 +590,9 @@ Promise.props(Promise.props({ num: 1, str: Promise.resolve('a') })).then(val =>
|
||||
|
||||
var propsMapValue: Map<number, string>;
|
||||
Promise.resolve(new Map<number, string>()).props().then(val => { propsMapValue = val });
|
||||
Promise.resolve(new Map<number, Promise.Thenable<string>>()).props().then(val => { propsMapValue = val });
|
||||
Promise.resolve(new Map<number, PromiseLike<string>>()).props().then(val => { propsMapValue = val });
|
||||
Promise.props(new Map<number, string>()).then(val => { propsMapValue = val });
|
||||
Promise.props(new Map<number, Promise.Thenable<string>>()).then(val => { propsMapValue = val });
|
||||
Promise.props(new Map<number, PromiseLike<string>>()).then(val => { propsMapValue = val });
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
|
||||
4
types/bluebird/index.d.ts
vendored
4
types/bluebird/index.d.ts
vendored
@@ -46,7 +46,7 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
|
||||
* Promises/A+ `.then()`. Returns a new promise chained from this promise. The new promise will be rejected or resolved dedefer on the passed `fulfilledHandler`, `rejectedHandler` and the state of this promise.
|
||||
*/
|
||||
// Based on PromiseLike.then, but returns a Bluebird instance.
|
||||
then<U>(onFulfill?: (value: R) => U | Bluebird.Thenable<U>, onReject?: (error: any) => U | Bluebird.Thenable<U>): Bluebird<U>; // For simpler signature help.
|
||||
then<U>(onFulfill?: (value: R) => U | PromiseLike<U>, onReject?: (error: any) => U | PromiseLike<U>): Bluebird<U>; // For simpler signature help.
|
||||
then<TResult1 = R, TResult2 = never>(onfulfilled?: ((value: R) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Bluebird<TResult1 | TResult2>;
|
||||
|
||||
/**
|
||||
@@ -620,7 +620,7 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
props<K, V>(this: PromiseLike<Map<K, Bluebird.Thenable<V> | V>>): Bluebird<Map<K, V>>;
|
||||
props<K, V>(this: PromiseLike<Map<K, PromiseLike<V> | V>>): Bluebird<Map<K, V>>;
|
||||
props<T>(this: PromiseLike<Bluebird.ResolvableProps<T>>): Bluebird<T>;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user