You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error has different types in browser and in node.js #4807
t.ts(1,19): error TS2339: Property 'stack' does not exist on type 'Error'.
This is correct for the browser, but incorrect for node.js.
If you cut and past the above code into the node REPL, node prints the stack trace for the error.
I thought this might be handled by tsc with a configuration parameter, but I couldn't find one.
Did I find a bug, or is there some corrective action I should take?
Activity
mhegazy commentedon Sep 15, 2015
this looks like a typings issue on the node.d.ts side.
defining this in one of your files should do the trick:
psnider commentedon Sep 16, 2015
Thanks. That works.
I'll issue a Pull Request on DT...
psnider commentedon Sep 16, 2015
See DefinitelyTyped/DefinitelyTyped#5838
vvakame commentedon Sep 20, 2015
it merged! 👍