From a820554d15fbddf9f78ac0ddd5577bfc5f95a0e7 Mon Sep 17 00:00:00 2001 From: Michel Boudreau Date: Wed, 16 Aug 2017 21:37:46 +1000 Subject: [PATCH] q.reject parameter is optional --- types/q/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/q/index.d.ts b/types/q/index.d.ts index 942d5535ec..7d3f01cfda 100644 --- a/types/q/index.d.ts +++ b/types/q/index.d.ts @@ -30,7 +30,7 @@ declare namespace Q { resolve(value?: IWhenable): void; - reject(reason: any): void; + reject(reason?: any): void; notify(value: any): void; @@ -145,7 +145,7 @@ declare namespace Q { /** * A sugar method, equivalent to promise.then(function () { throw reason; }). */ - thenReject(reason: any): Promise; + thenReject(reason?: any): Promise; /** * Attaches a handler that will observe the value of the promise when it becomes fulfilled, returning a promise for that same value, perhaps deferred but not replaced by the promise returned @@ -324,7 +324,7 @@ declare namespace Q { */ export function reject(reason?: any): Promise; - export function Promise(resolver: (resolve: (val?: IWhenable) => void, reject: (reason: any) => void, notify: (progress: any) => void) => void): Promise; + export function Promise(resolver: (resolve: (val?: IWhenable) => void, reject: (reason?: any) => void, notify: (progress: any) => void) => void): Promise; /** * Creates a new version of func that accepts any combination of promise and non-promise values, converting them to their fulfillment values before calling the original func. The returned version