diff --git a/types/q/index.d.ts b/types/q/index.d.ts index 33b316591a..e192b6692b 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