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:
Nathan Shively-Sanders
2019-02-25 14:28:36 -08:00
parent 05d4224c2f
commit 1a35aa7ea1
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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());
+3 -3
View File
@@ -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.