I think the intention is that the declaration file should contain any reference comments that point to dependencies, for example... if I manually wrote a declaration file for a jQuery plugin, I would add the following to the top of the d.ts file:

///<reference path="../jquery/jquery.d.ts" />

My plugin declaration now has its dependencies clearly labelled, rather than relying on the consumer to add both jquery.d.ts and myplugin.d.ts to their TypeScript file.

This is exactly the issue I'm experiencing. As ursuletzu stated, the --comments flag is ignored for declaration files and this is a problem because manually adding the references will get overwritten on next build.

I want the opposite of this feature. Declarations files with references to file paths are terrible. It makes the declarations file less portable because all of your project structures have to be the same.

My situation is this: I have 3 projects A, B, and C. B is a collection of typescript files that are shared between projects A and C. B is dependent upon JQuery which means it has a /// <reference path="JQuery.d.ts" /> reference. However, projects
A and B are not structured the same which means I have to alter project B's declarations file when I add it to project A. I have to change the reference to something like /// <reference path="../../JQuery.d.ts" >. This makes automating my build
process super annoying because I have to change the reference in my declarations file. The same goes for when I import the declarations file to project C.

A few more details about my situation. Project B is just a collection of Typescript files. It includes one Typescript file, B.all.ts, that simply references all the other Typescript files in the project. Like:
/// <reference path="file1.ts" >
/// <reference path="file2.ts" >
etc.

Then to build the declarations file I wrote a command that does this: tsc.exe -d -out $(ProjectDir)\B.all.js --target ES5 $(ProjectDir)\B.all.ts. The result is a declarations file for all the objects in project B. Which is great. Except for the local references
to JQuery.d.ts. So as an attempted work around I added this to B.all.ts: interface JQuery {}. The resulting definitions file includes this new definition now: interface JQuery {}. Which makes the declarations file compile unfortunately, the references to JQuery.d.ts
are still included as well.

Is there any way to make the declarations file remove the local references to JQuery.d.ts? I'm using Typescript 0.9.1.1.

Bumping ScottJet's comment. This makes publishing a library really unpleasant, since I am now placing project structure constraints on my consumers. As of 0.9.5.0, I still can't see a way to disable this. Please help us!