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

4 comments
Comment actions Permalink

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

0
Comment actions Permalink

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.

0
Comment actions Permalink

But you have to - reference comments are required by typescript compiler, there is no way to avoid using them in WebStorm

0
Comment actions Permalink

References are not "absolutely required" if the dependencies are provided to the compiler through command line parameters.  This is what Visual Studio does.

0

Please sign in to leave a comment.