Issue
I am trying out TypeScript on Node.js.
I have installed it using
npm install typescript
When just run tsc
:
:~$ tsc
Version 1.0.1.0
Syntax: tsc [options] [file ..]
So, I am trying to run simple code:
console.log('test');
which is not outputing nothing.
How can I output anyting in console from typescript running on node.js?
Solution
tsc is a compiler not a repl.
You need to write your typescript , compile it with tsc then execute it with nodejs.
Answered By - mpm
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.