Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Typescript files show errors in IntelliJ IDEA Community Edition

I am facing issue with TypeScript in IntelliJ IDEA Community Edition. Earlier I have used IntelliJ IDEA Ultimate Edition for Angular 2 development and it works fine.

This is the error I am getting in my .ts file. Plus there is no intelliSense. Is this feature unavailable in the Community Edition?

CE errors

like image 763
user911 Avatar asked Feb 25 '17 21:02

user911


1 Answers

As zhengyue pointed out in comments, apparently you are using the "TypoScript" plugin, which is not a "Typescript" plugin.

I made the same mistake. And I also had the same problems that you experienced. Personally I thought it was the @Component decorator that messed things up. But it was zhengyue who pointed out I was using the wrong plugin.


The conclusion for me was that it was better to search for a good alternative. Because I still want to develop my back-end in Java, I wanted ...

  • something that integrates with IntelliJ as good as possible
  • but still something which is powerful.

At first I tried eclipse, and found powerful tools in their marketplace, which turned out to be commercial products and expired after 8 days.

Secondly, I downloaded "Visual Studio Code", (not to be confused with the full blown Visual Studio). It is FAST and user-friendly. It launches in less than 2 seconds on my system. And it has great plugins, which allow me to use code completion and refacturing tools. Here is the list of plugins I have installed:

plugins

As you can see, there is a plugin that makes you use the keybindings of intellij.

In IntelliJ I configured my ".ts" files to be handled as javascript files. Because it's better than nothing.

javascript plugin for IntelliJ

I work in IntelliJ all day when I'm working on the Java back-end, and thanks to the javascript features, I still have some (limited) code highlights for the Angular front-end as well. But, when I want to edit something in the front end, I use Visual Studio Code. To make this a smooth transition, I right-click inside the file and use an external tool configuration:

context menu

Inside my IntelliJ I configured the root of the angular project as a module. Then the configuration of this external tool looks like this:

configuration of external tool

This allows me to switch from IntelliJ to Visual Studio code in about 2 seconds, and immediately to the correct line in the correct file.

So, that's what my free Angular-with-Java-combo development workspace looks like.

like image 199
bvdb Avatar answered Oct 05 '22 12:10

bvdb