Check out example codes for "how to run typescript file". It will help you in understanding the concepts better.

Code Example 1

npx ts-node src/foo.ts

Code Example 2

"scripts": {
    "clean": "rimraf dist",
    "start": "npm-run-all clean --parallel watch:build watch:server --print-label",
    "watch:build": "tsc --watch",
    "watch:server": "nodemon './dist/index.js' --watch './dist'"
}

Learn ReactJs, React Native from akashmittal.com