How to run TypeScript files from command line?

前端 未结 13 1501
死守一世寂寞
死守一世寂寞 2020-11-27 10:13

I\'m having a surprisingly hard time finding an answer to this. With plain Node.JS, you can run any js file with node path/to/file.js, with CoffeeScript it\'s <

13条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-27 10:37

    This question was posted in 2015. In 2018, node recognizes both .js and .ts. So, running node file.ts will also run.

提交回复
热议问题