To fix the error, you need to copy the downloaded definitelyTyped TypeScript stubs from ~/Library/Caches/WebStorm9/extLibs
folder to your project directory and reference them in your .ts file using /// <reference path>
comments, like
/// <reference path="path/to/angular.d.ts" />
Just to make things clear:
When you download Typescript stubs via Preferences/Languages & Frameworks/Javascript/libraries, they are placed into ~/Library/Caches/WebStorm9/extLibs
.
It's perfectly fine for Webstorm - it doesn't require placing library files directly in the project folder. Also, Webstorm itself doesn't need ///reference
comments to be able to resolve types - type hinting/navigation/completion works even if the types are not explicitly referenced. But the tsc compiler does need the d.ts files being placed somewhere in the project directory and referenced via ///reference
comment.
So, to get downloaded stubs available to typescript compiler, you need to copy/move them to you project directory (and probably rename to more human readable names :)) and add comments (can be done using 'Generate reference path comment
' intention (hit Alt+Enter on a reference to generate a comment)).
We plan to provide an option to download files directly to the project folder (instead of system/extLibs/ ) in the future versions