TypeScript in IntelliJ
IntelliJ with Bazel

TypeScript in IntelliJ

Make sure you are using IntelliJ Ultimate Edition.

.bazelproject settings

Request TypeScript support by adding typescript to the additional_languages section. You also have to point to the rule that generated your tsconfig.json file using ts_config_rules.

Example: add these lines to your .bazelproject file:

additional_languages:
  javascript
  typescript

ts_config_rules:
  # substitute your own project's 'ts_config' rules here, for example
  # //javascript/typescript/examples/codelab:tsconfig
  //com/google/{project_path}/typescript:tsconfig
  //com/google/{project_path}/testing/typescript:tsconfig

Tip: Sanity check — Are the :tsconfig targets in your BUILD files from directories named up in the directories stanza listed in ts_config_rules?

Whenever you sync, we will bazel run these targets.