continuation
continuation copied to clipboard
cont() and obtain() do not work when instantiating a class
The code in this function:
function t() {
var csvPath = '/tmp/contacts.csv';
parser = new ContactDocParser(csvPath, cont());
}
gets compiled to
function t() {
var csvPath = '/tmp/contacts.csv';
parser = new ContactDocParser(csvPath, cont());
}
/* Generated by Continuation.js v0.1.4 */
It just ignores it.
When I remove the new
statement, it does replace the cont()
Sorry but I do not think this makes sense because it is seldom seen that a callback function is pass to a constructor of object in JavaScript. Could you tell me why this syntax is needed?
Thank you