'compiling typescript file creates empty js file in vs code

I have installed vs code on ubuntu 20 and wanted to compile a .ts file via tsc which created a empty js file.
node is installed , also typescript

also testing it with webstorm created a correct js file

why does this dont work in vs code ?



Solution 1:[1]

You probably have not saved the file. Ctrl + s your .ts file and then run the tsc command in terminal.

Solution 2:[2]

your problem is very unusual and nobody can help you. You can try re-install TypeScript (npm install typescript) or you can use the online compiler on https://www.typescriptlang.org/play.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bhakti
Solution 2 Tomáš Wróbel