上一篇 TypeScript – Get Started 使用了命令
tsc index.ts --module es2015
很少人会在命令时给写 config, 更正规的做法是创建一个 tsconfig.json 把所有 config 写到里面去. 类似 webpack.config.js, tailwind.config.js, .eslintrc.json, prettier.config.js, stylelint.config.js
tsc --init
运行命令后就会创建出 tsconfig.json 了
里面包含了所有 config 和 注释. 有需要的就开启.