diff --git a/types/ember/index.d.ts b/types/ember/index.d.ts index 37818e787e..201f14f156 100644 --- a/types/ember/index.d.ts +++ b/types/ember/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for Ember.js 2.7 // Project: http://emberjs.com/ // Definitions by: Jed Mao +// bttf // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -1571,6 +1572,34 @@ declare namespace Ember { @return {Promise} */ finally(callback: (a: T) => V, label?: string): Promise; + + static all(promises: GlobalArray<(Q | Thenable)>): Promise; + static race(promises: GlobalArray>): Promise; + + /** + @method resolve + @param {Any} value value that the returned promise will be resolved with + @param {String} label optional string for identifying the returned promise. + Useful for tooling. + @return {Promise} a promise that will become fulfilled with the given + `value` + */ + static resolve(object?: Q | Thenable): Promise; + + /** + @method cast (Deprecated in favor of resolve + @param {Any} value value that the returned promise will be resolved with + @param {String} label optional string for identifying the returned promise. + Useful for tooling. + @return {Promise} a promise that will become fulfilled with the given + `value` + */ + static cast(object: Q | Thenable, label?: string): Promise; + + /** + `RSVP.Promise.reject` returns a promise rejected with the passed `reason`. + */ + static reject(reason?: any): Promise; } function all(promises: GlobalArray>): Promise;