TypeScript
for Windows and Linux
for macOS
Ctrl+Alt+S
In this dialog, activate, deactivate, and configure the behaviour of the built-in TypeScript compiler that compiles 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, IntelliJ IDEA detects the Node.js executable and fills in the field automatically. |
TypeScript version | In this area, specify the version of the compiler to use (IntelliJ IDEA 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 IntelliJ IDEA itself. To get only suggestions from IntelliJ IDEA, click Configure and clear the Code completion check box in the Service Options dialog box that opens. IntelliJ IDEA supports integration with the Angular language service developed by the Angular team to improve code analysis and completion for Angular-TypeScript projects. Note that the Angular language service works only with the projects that use Angular 2.3.1 or higher and TypeScript version compatible with it. The Angular language service is activated by default so IntelliJ IDEA starts it automatically together with the TypeScript service and shows all the errors and warnings in your TypeScript and HTML files both in the editor and in the TypeScript Compiler Tool Window. However if you still need to activate the service, click Configure and select the Use Angular service check box in the Service Options dialog box that opens. By default, the Use TypeScript Service check box is selected. In the Default options field, specify the command line options to be passed to the compiler when the |
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, IntelliJ IDEA 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:
|