Automatic Typescript Definition References?
Visual Studio automatically includes found .d.ts files in the project during editing and also passes them to the tsc compiler. I am finding that I am having to add references manually in WebStorm 10. I am doing this by including a reference to the tsd.d.ts file created by the tsd package manager in each .ts source file.
Is there a way to get WebStorm to automatically include .d.ts files during compilation?
My project struture has folders:
app - contains all files for the web application including .ts files
typings - all .d.ts files installed by tsd
I tried the command line options
--target ES5 --module amd ./typings/tsd.d.ts
and
--target ES5 --module amd typings/tsd.d.ts
but that did not work either.
projectdir isn't an available macro
请先登录再写评论。
If the .d.ts files are available in your project directory and included in your .ts files via the ///<reference path> comments, it's enough to get them available to tsc compiler
I don't think you read my post. I don't want to have to include the ///<reference the same way I don' have to have them in Visual Studio.
But you have to - reference comments are required by typescript compiler, there is no way to avoid using them in WebStorm
References are not "absolutely required" if the dependencies are provided to the compiler through command line parameters. This is what Visual Studio does.