Skip to content

Instantly share code, notes, and snippets.

@kriszyp
Created December 17, 2009 15:25
Show Gist options
  • Save kriszyp/258809 to your computer and use it in GitHub Desktop.
Save kriszyp/258809 to your computer and use it in GitHub Desktop.
var promise = new process.Promise();
promise.then(function(){
require("sys").puts("done");
});
promise.emit("success");
$ 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