How to compile a Typescript file?

Sharad Jaiswal
Sharad Jaiswal

Posted On: Feb 22, 2018

 

A Typescript file is used to write more manageable and complex code in AppBuilder but before that, they need to be compiled to JavaScript. Here are the steps which are followed while compiling a Typescript file to JavaScript: –
  1. It should be firstly verified that the Typescript engine has been enabled or not. In the title bar, click your username and select options.
  2. In the project navigator, select and right-click the TS files that are to be compiled.
  3. Choose compile to JavaScript.
  4. Add a <script> reference for the JS file in the HTML code if needed.
  5. To compile a typescript file via command line tsc <TypeScript File Name> command is used.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Typescript Interview Questions

    What is Typescript?

    Typescript is a free and open-source programming language which is designed and developed by Microsoft. It was designed ..

    Typescript Interview Questions

    List some features of Typescript?

    Features of Typescript are:- Typescript can be compiled to all major versions of Javascript(ES3,ES5,ES6,ES7). Typescrip..

    Typescript Interview Questions

    List some benefits of using Typescript?

    Following are some benefits of using Typescript One of the biggest advantages of Typescript is its code completion and ..