mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-14 05:50:20 +00:00
Small cleanup
1. Fix Array<> lint
2. Use {} instead of unknown to continue targetting 2.9.
3. Update tests -- still no way to get anything but `any` from `call`.
This commit is contained in:
@@ -553,7 +553,7 @@ bool = fooProm.isResolved();
|
||||
strProm = fooProm.call("foo");
|
||||
strProm = fooProm.call("foo", 1, 2, 3);
|
||||
|
||||
// $ExpectType Bluebird<never>
|
||||
// $ExpectType Bluebird<any>
|
||||
quxProm.call("qux");
|
||||
|
||||
strProm = fooProm.get("foo").then(method => method());
|
||||
|
||||
Vendored
+3
-3
@@ -560,12 +560,12 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
|
||||
/**
|
||||
* Like calling `.then`, but the fulfillment value or rejection reason is assumed to be an array, which is flattened to the formal parameters of the handlers.
|
||||
*/
|
||||
spread<U, Q>(this: Bluebird<R & Iterable<Q>>, fulfilledHandler: (...values: Array<Q>) => Resolvable<U>): Bluebird<U>;
|
||||
spread<U, Q>(this: Bluebird<R & Iterable<Q>>, fulfilledHandler: (...values: Q[]) => Resolvable<U>): Bluebird<U>;
|
||||
|
||||
/**
|
||||
* 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(this: Bluebird<Iterable<unknown>>): Bluebird<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.
|
||||
@@ -592,7 +592,7 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<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(this: Bluebird<Iterable<unknown>>, count: number): Bluebird<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.
|
||||
|
||||
Reference in New Issue
Block a user