+ 1
Can I directly process typescript code into javascript code?
For Example, My typescript code (server.ts) let a:number,b:number; a = 40; b = 2; console.log (a+b); I want to directly run this code as node code.
5 Réponses
+ 2
No, you must compile your .ts file to .js .
A way to compile is by running `tsc server.ts` in the terminal where your file is located.
+ 2
Run from Sololearn code playground (on pc only)
https://code.sololearn.com/WGIWhwyGD7SX/?ref=app
+ 2
Cannot run from mobile device
+ 1
Actually, it's generating error