Callback
Closed this issue · 3 comments
andreineculau commented
You could make Callback return the .callback
function itself, with a property .promise
, no?
var callback = new Callback();
fs.readdir(".", callback);
var files = (*callback.promise)[1];
soliton4 commented
i have given this some thought and i apprechiate ppl getting involved.
the callback api is not final of course.
the problem is:
new Callback() would have to return a function. is this even possible?
the property .promise has to stay since i want the final promiseland internal promiseimplementation to be just a function.
there will be import and export functions for interacting with promiseland promises from the outside
soliton4 commented
it actually is possible
see new implementation of Callback
https://github.com/soliton4/promiseland/blob/master/promiseland.js#L163
soliton4 commented
@andreineculau i just updated the website.
lots of code examples now