Software Development

Convert TypeScript to JavaScript

This post demonstrates the basic process of converting TypeScript codes to JavaScript.

Stuff Used

  • Windows 10
  • TypeScript 3.0.3
    • To be installed (see instructions below)
  • NodeJS 8.11.3
    • Must be installed
  • npm 5.6.0
    • Must be installed
  • Visual Studio Code 1.24.1
    • Alternatively, we can use any text file editor

Verify Versions

Verify npm version

Verify NodeJS version

Install TypeScript

We need to install TypeScript using the installed NodeJS and npm.

Verify the TypeScript version.

Our TypeScript Codes

To convert these codes, perform the following operation on the command line window.  A file HelloEarth.js is then generated.

Running HelloEarth.js

Loading

Got comments or suggestions? We disabled the comments on this site to fight off spammers, but you can still contact us via our Facebook page!.


You Might Also Like