TypeScript
Node interpreter
In this field, specify the Node.js interpreter to use.
If you choose the Project alias, PhpStorm will automatically use the project default interpreter from the Node interpreter field on the Node.js page . In most cases, PhpStorm detects the project default interpreter and fills in the field itself.
You can also choose another configured local or remote interpreter or click and configure a new one.
TypeScript
In this field, specify the version of the TypeScript to use (PhpStorm displays the currently chosen version).
By default, the
typescript
package from the project's node_modules folder is used.Bundled: choose this option to use the
typescript
package that is shipped with PhpStorm without attempting to find another one.Select: choose this option to use a custom
typescript
package instead of the one bundled with PhpStorm. In the dialog that opens, choose the path to the relevant package.If your project package manager is Yarn 2, you have to use the
typescript
package installed via Yarn 2. In this case,yarn:package.json:typescript
is by default selected.Learn more about package managers from npm and Yarn.
TypeScript Language Service
Select this checkbox to get native support from the TypeScript Language Service according to the up-to-date specifications. As a result:
Syntax and error highlighting is based on the annotations from the TypeScript Language Service.
Completion lists contain both suggestions from the TypeScript Language Service and suggestions calculated by PhpStorm.
TypeScript code is compiled into JavaScript.
Item | Description |
---|---|
Show project errors | By default, this checkbox is selected and the TypeScript Language Service checks the code across the entire project. The detected errors are listed in the Project Errors tab of the Problems tool window grouped by files where they occurred. To avoid performance issues, clear the Show project errors checkbox so the TypeScript Language Service checks files only when you open them. The Project Errors tab will then list the errors that are detected only in the files that you have already opened. |
Show suggestions | By default, this checkbox is selected and PhpStorm shows potential problems that the TypeScript Language Service detects in your code in addition to actual errors. |
Use types from server | Select this checkbox to evaluate types of symbols based on the data from the TypeScript Compiler. By default, the checkbox is cleared, so type evaluation, resolution, code inspections and refactorings are based on the type information from the PhpStorm internal TypeScript engine. This default behavior may result in performance issues and in bugs in type resolution because the type evaluation algorithm that the PhpStorm internal TypeScript engine uses differs from the algorithm of the TypeScript Compiler. Selecting the checkbox may help avoid these problems. |
Recompile on changes |
|
Options | In this field, specify the command-line options to be passed to the TypeScript Language Service when the tsconfig.json file is not found. See the list of acceptable options at TSC arguments. Note that the |