Languages
[Edit]
EN

TypeScript - how to install tsc under Windows (TypeScript compiler)

16 points
Created by:
Imaan-Morin
1009

In this article, we would like to show how to install TypeScript compiler under Windows.

Quick solution:

Note: typescript package contains tsc command.

 

Detailed desription

Edit
  1. Ensure that Node.js and npm command are installed
    (installation and running instruction is here).
  2. Open some terminal as administrator, e.g. Bash
    (an installation instruction is here).
  3. Install TypeScript compiler using:
    Where: -g flag means global installation.
    Example output:

 

*.ts compilation instruction

Edit
  1. Create Script.ts file:
  2. Run tsc command:

    Note: Script.js file should be created from Script.ts file.

  3. Run compiled program:

    Output:

Warning:

tsconfig.json file located in sources directory may change compilation configuration. To solve the problem you can edit the configuration or remove the file.

 

References

Edit
  1.  TypeScript Installation - Microsoft Docs

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

TypeScript

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join