-
-
Notifications
You must be signed in to change notification settings - Fork 545
Closed
Description
With a very simple t.ts
as follows:
console.trace('a');
$ ts-node t
[object Object]
at Object.<anonymous> (/private/tmp/t.js:2:9)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Function.Module.runMain (module.js:665:10)
at Object.<anonymous> (/Users/rfeng/.nvm/versions/node/v8.6.0/lib/node_modules/ts-node/src/_bin.ts:182:12)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
Please note [object Object]
is printed out instead of a
.
tsc compiles the code to console.trace('a');
and it works as expected.
BTW, console.log does NOT have the same issue.