Mary
Mary

Reputation: 1135

Why doesn't console.log work in Typescript for me?

My code is trivial:

console.log("Hello world");

But when I run:

tsc hello.ts

I don't get any console output.

Is there something additional I need to do?

Upvotes: 6

Views: 11545

Answers (1)

Chris Sharp
Chris Sharp

Reputation: 1995

Install ts-node and use that to run your Typescript files

https://www.npmjs.com/package/ts-node

enter image description here

Upvotes: 5

Related Questions