Reputation: 13342
I use latest IntelliJ IDEA
(14.0.3) with (embedded) TypeScript
/JS
Support.
I Downloaded this angular-route.d.ts file to put to my project.
And the IDE shows me the highlighting, that that syntax is wrong.
I use Using tsc v1.4.1
ts-compiler for my project. (not sure if IDE
is aware of it though).
Q: How to know what v of typescript compiler IDE
uses? And how to make that ts-file to be valid?
I've read this official doc, but must be I missed something. As I understand the IDE should use that compiler I've installed as nmp
-package.
My project consists of package.json
, GruntFile.js
etc.. files - nodejs
-like project.
In overal the stuff from ts-files are resolved.. Like I can see and navigate to that file
function config($routeProvider: IRouteProvider): void {
$routeProvider
.when('/area11/stuff/newstuff', {
template: '<div>New Stuff</div>',
controller: (): void => {},
controllerAs: 'vm'
});
}
So I can see/navigate to 'IRouteProvider' (which is defined in that highlighting file) from the IDE. This the project itself is set.. Just that little 'disappointment' with highlighting.
Upvotes: 0
Views: 1384
Reputation: 275997
Q: How to know what v of typescript compiler IDE uses? And how to make that ts-file to be valid?
There is a difference between the compiler and language service. The IntelliJ IDE has its own language service implementation. It needs to be updated for 1.4.1 (already done in beta channel).
Either use an older definition (from the 1.3 branch on definitely typed) or use beta IntelliJ.
It will still use your compiler so code will compile fine irrespective.
Upvotes: 1