node.js - nodejs console.log does not produce a output on Windows inside a funtion -
i tried following code(which produced corresponding typescript code) , played solution in previous questions , answers. no luck, nothing produced code inside startup() function, works 2 bottom lines. idea? using both nodejs 6.11.x , 8.4.x on both windows 7sp1 , 10.
thanks,
david
var startup = /** @class */ (function () { function startup() { } startup.main = function () { console.log('hello world!'); console.warn('this warning!'); return 0; }; return startup; }()); console.log("this log"); console.warn("thi warn"); //# sourcemappingurl=helloworld.js.map sorry, more info oh corresponding typescript file
class startup { public static main(): number { console.log('hello world!'); console.warn('this warning!'); return 0; } } console.log("this log"); console.warn("thi warn");
try code
function startup() { console.log('hello world!'); console.warn('this warning!'); return startup; } startup(); console.log("this log"); console.warn("thi warn"); and giving me output
hope helps..

Comments
Post a Comment