From 1a35aa7ea119f989a8bb96e1a5cd7c6eec1137a5 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Mon, 25 Feb 2019 14:28:36 -0800 Subject: [PATCH] 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`. --- types/bluebird/bluebird-tests.ts | 2 +- types/bluebird/index.d.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/types/bluebird/bluebird-tests.ts b/types/bluebird/bluebird-tests.ts index 05ac5cc19c..c7b1112a9e 100644 --- a/types/bluebird/bluebird-tests.ts +++ b/types/bluebird/bluebird-tests.ts @@ -553,7 +553,7 @@ bool = fooProm.isResolved(); strProm = fooProm.call("foo"); strProm = fooProm.call("foo", 1, 2, 3); -// $ExpectType Bluebird +// $ExpectType Bluebird quxProm.call("qux"); strProm = fooProm.get("foo").then(method => method()); diff --git a/types/bluebird/index.d.ts b/types/bluebird/index.d.ts index e8c6dbf5a2..efb43450eb 100644 --- a/types/bluebird/index.d.ts +++ b/types/bluebird/index.d.ts @@ -560,12 +560,12 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { /** * 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(this: Bluebird>, fulfilledHandler: (...values: Array) => Resolvable): Bluebird; + spread(this: Bluebird>, fulfilledHandler: (...values: Q[]) => Resolvable): Bluebird; /** * 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>): Bluebird; + all(this: Bluebird>): Bluebird; /** * 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 implements PromiseLike, Bluebird.Inspection { * 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>, count: number): Bluebird; + some(this: Bluebird>, count: number): Bluebird; /** * 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.