I am learning Angular/Typescript and found my first issue. Don't even know how to ask it correctly. Searched it around and got nothing.
I have a main.ts file with this code
function myFunc(x,y){
return x+y;
}
let num = 2;
const PI = 3.14;
When I do the command
tsc main.ts
It creates an empty file named main.js
In the video course I am watching, the generated file is populated with the corresponding javascript.
What should I do? Thanks in advance
I encountered a similar issue. I quickly realized that I haven't save the main.ts file on VS code by running:
cat main.ts
In that case, you are basically compiling an empty file. I guess the tutorial did not bother to mention that you should manually save your file.
You first need to save the file. (Ctrl + s)
.
Otherwise compiler will compile an empty file.
So you should manually save the file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With