npx tsc --init
で、tsconfig.json が出来る

package.json に、こう書いておいて、

"script": {
"build": tsc
},

npm run build
で、コンパイルする