vs code auto compile typescript code example
Example 1: how to run typescript file
npx ts-node src/foo.ts
Example 2: vsc typescript auto build on save
// tsconfig.json (compile tsc for update changes)
{
"compileOnSave": true,
"compilerOptions": {
"watch": true
}
}