1.安装全局ts 2.安装 ts-node 3.运行 第一种方法,不需要安装ts-node tsc demo1.ts node demo1.js 第二种方法,安装ts-node之后进行执行 ts-node demo1.ts