A
A
Anton2016-02-15 15:37:13
JavaScript
Anton, 2016-02-15 15:37:13

How to make phpStorm recognize TypeScript configured with Angular2?

Actually, I did everything according to the tutorial https://angular.io/docs/ts/latest/quickstart.html
I copied the contents of the files:
tsconfig.json
typings.json
package.json

I did it npm install
Then I copied app/app.component.ts
I set up the filewatcher in the storm to use tsconfig, then I realized that the typescript version in the storm is 1.7.3, updated it (to 1.7.5) and node.js at the same time (to 5.6.0), registered the path in the watcher settings, but there are a lot of similar errors in the logs of the typescript watcher :

F:\work\ang2.lc\node_modules\angular2\src\core\change_detection\parser\locals.d.ts
Error:(3, 14) TS2304: Cannot find name 'Map'.
Error:(4, 42) TS2304: Cannot find name 'Map'.
F:\work\ang2.lc\node_modules\angular2\src\core\debug\debug_node.d.ts
Error:(14, 13) TS2304: Cannot find name 'Map'.
Error:(24, 17) TS2304: Cannot find name 'Map'.
Error:(25, 17) TS2304: Cannot find name 'Map'.
...

UPD .: if anyone encounters a similar one, then trysudo npm install typings --global

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MNB, 2016-02-15
@MNB

You need to check the box "Use tsconfig.json"
screencast.com/t/YwtdWVEF3P
phpstorm is not at hand, but I think webstorm works the same way

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question