-
-
Save kriszyp/258809 to your computer and use it in GitHub Desktop.
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
var promise = new process.Promise(); | |
promise.then(function(){ | |
require("sys").puts("done"); | |
}); | |
promise.emit("success"); |
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
$ node c.js | |
/projects/node-sandbox/c.js:2 | |
promise.then(function(){ | |
^ | |
TypeError: Object [object Object] has no method 'then' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment