TypeScript
for Windows and Linux
for OS X
Ctrl+Alt+S
In this dialog, activate, deactivate, and configure the behaviour of the built-in TypeScript compiler that transpiles TypeScript code into JavaScript so the code can be executed in a browser and generates sources maps that ensure correspondence between the lines in the generated JavaScript code and the lines in the original TypeScript code.
Item | Description |
---|---|
Resolve objects using tsconfig.json |
|
Enable TypeScript Compiler | Select this check box to activate the built-in compiler. When the check box is selected, the fields below on the page become active and you can configure the behaviour of the compiler. |
Node interpreter | In this field, specify the location of the Node.js executable file. In most cases, PhpStorm detects the Node.js executable and fills in the field automatically. |
Compiler version |
In this area,
specify the version of the compiler to use. PhpStorm displays the default bundled version.
To use a custom version of the compiler:
|
Generate source maps | Select this check box to generate source maps that set correspondence between lines in your TypeScript code and in the generated JavaScript code, otherwise your breakpoints will not be recognised and processed correctly. |
Track changes |
|
Scope |
From this drop-down list, choose the scope to apply the compiler in. The available options are:
VCS Scopes: these scopes are only available if your project is under version control.
|
Command line options |
In this field,
specify the command line options to be passed to the compiler.
See the list of acceptable options at TSC arguments.
Note that, the -w or --watch option (Watch input files) is irrelevant.
|
Compile main file only |
Select this check box
to have PhpStorm compile only a specific file and the files that are referenced from it and ignore all the other files in the project.
This may be helpful if you have a dedicated main.ts file which only references other files.
|
Use output path |
Select this check box
to have the built-in compiler store the generated JavaScript files and source map in a custom folder.
Specify the path to this folder explicitly or use one of the listed available macros in the format: $<macros_name>$ .
The available macros are:
|