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 |
---|---|
Node interpreter | In this field, specify the location of the Node.js executable file. In most cases, PyCharm detects the Node.js executable and fills in the field automatically. |
TypeScript version |
In this area,
specify the version of the compiler to use (PyCharm displays the currently chosen version):
|
Use TypeScript Service |
Select this check box
to get native support from the TypeScript Language Service
according to the up-to-date specifications. In this case syntax and error highlighting is performed based on the annotations retrieved from the
TypeScript Language Service while code completion lists contain
both suggestions from the TypeScript Language Service and suggestions calculated by PyCharm itself.
To get only suggestions from PyCharm, click Configure and clear the Code completion check box
in the Service Options dialog box that opens.
By default, the Use TypeScript Service check box is selected. |
Enable TypeScript Compiler | Select this check box to activate the built-in compiler. When the check box is selected, syntax highlighting and code completion are provided based only on the data from the built-in Typescript compiler. After you select this check box, the fields below in the area become active and you can configure the behaviour of the compiler. By default, the check box is cleared. |
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.
|
Use tsconfig.json |
Choose this option to
have the built-in compiler analyze the code according to the settings specified in the tsconfig.json file.
When you open a project, PyCharm starts searching for a tsconfig.json file in it. If a tsconfig.json file is found,
the compiler uses the options specified in it. Otherwise an error is reported.
|
Set options manually |
Choose this option to configure the behaviour of the built-in compiler manually:
|