PyCharm
 
Get PyCharm

Compiling TypeScript into JavaScript

Last modified: 22 November 2024

Because browsers and Node.js process only JavaScript, you have to compile your TypeScript code before running or debugging it.

Compilation can also produce source maps that set correspondence between your TypeScript code and the JavaScript code that is actually executed.

PyCharm comes with a built-in TypeScript compiler. By default, it outputs generated JavaScript files and sourcemaps next to the TypeScript file.

Compilation is invoked with the Compile actions from the TypeScript widget on the Status toolbar as described in Compile TypeScript code below.

Compilation errors are reported in the TypeScript Tool Window. This list is not affected by changes you make to your code and is updated only when you invoke compilation again.

https://resources.jetbrains.com/help/img/idea/2024.3/ws_ts_toolwindow_compilation_errors.png
Gif

The tool window shows up only after you first compile your TypeScript code manually. After that the tool window is accessible via View | Tool Windows | TypeScript in the main menu or via the tool window bar.

Reference

Language and Framework-Specific Guidelines