Created
April 13, 2017 02:16
-
-
Save riversun/84735e382e58853c235a52eb8140c882 to your computer and use it in GitHub Desktop.
Snipet of Tehnnable(Promise) Method prototype
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Thennable Method(prototype) | |
* @param myObject | |
* @returns {Promise} | |
*/ | |
MyClazz.prototype.method = function (myObject) { | |
var me = this; | |
return new Promise(function (resolve, reject) { | |
var result = {res: myObject}; | |
resolve(result); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment