IntelliJ IDEA 13.1.0 Web Help

Some features described here are available in Ultimate edition only.

TypeScript code is not processed by browsers that work with JavaScript code. Therefore to be executed, TypeScript code has to be translated into JavaScript. This operation is referred to as transpilation and the tools that perform it are called transpilers.

For more details about using transpilers in IntelliJ IDEA, see the section Using File Watchers.

To run a file with injected TypeScript from IntelliJ IDEA

No run configuration is required for launching applications with injected TypeScript from IntelliJ IDEA.

  1. Transpile the TypeScript code into Javascript.
  2. In the editor, open the HTML file with the TypeScript reference. This HTML file does not necessarily have to be the one that implements the starting page of the application.
  3. Manually replace the reference to the TypeScript file with the reference to the JavaScript file that was generated through the transpilation.
  4. Do one of the following:
    • Choose View | Preview file in on the main menu or press Alt+F2Alt+F2Alt+F2Alt+F2Alt+F2Alt+F2Alt+F2 or Ctrl+Alt+F2Alt+F2Alt+F2Alt F2Alt F2Alt F2. Then select the desired browser from the pop-up menu.
    • Hover your mouse pointer over the code to show the browser icons bar: browserIcons Click the icon that indicates the desired browser.

See Also

Concepts:

Procedures:

Reference:

Web Resources: