Deno Javascript Runtime - How to Run Typescript File

in hive-119463 •  3 years ago 

Yesterday I posted about the ability of Deno to run the javascript file for execution on your desktop or server. So today I want to cover the typescript example. So we are going to see how to compile and execute the typescript and check out the output.

So make sure to install deno runtime if you have not yet. Also make sure to test out the deno installation using the following command.

deno --version

Now comes the deno compiling the typescript part. Use the following command to do just that.

deno run path/welcome.ts

Replace the URL with your typescript file on the desktop. If you want you can navigate to that path too.

And then if you want to check out the video example of the deno running the typescript file. You should check out the below video.

As you can see that is pretty simple approach of doing this one step at a time. And it can get rid of a lot of errors without having to worry about how the compilation works. If you have tried this example then do let me know in the comment.

Have you tried deno runtime for typescript?

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!