diff --git a/q/Q-tests.ts b/q/Q-tests.ts index e59f2dc1b3..eaa1241016 100644 --- a/q/Q-tests.ts +++ b/q/Q-tests.ts @@ -4,6 +4,7 @@ import q = require('q'); Q(8).then(x => console.log(x.toExponential())); +Q().then(() => console.log("nothing")); var delay = function (delay: number) { var d = Q.defer(); diff --git a/q/Q.d.ts b/q/Q.d.ts index 1fa4642121..55ac3df6a1 100644 --- a/q/Q.d.ts +++ b/q/Q.d.ts @@ -12,6 +12,10 @@ declare function Q(promise: Q.IPromise): Q.Promise; * If value is not a promise, returns a promise that is fulfilled with value. */ declare function Q(value: T): Q.Promise; +/** + * Calling with nothing at all creates a void promise + */ +declare function Q(): Q.Promise; declare namespace Q { interface IPromise {