I'm using grunt-typescript, which is compiling all my *.ts files. I'm using both angular-mocks.d.ts and node.d.ts, however I'm referencing them separately in my actual ts files. I'm using angular-mocks only for jasmine testing, and I'm using node in my server.ts file.
The problem I'm having is that, even though they're referenced separately, when they are compiled within grunt-typescript, it seems to dump them together somehow so that their two different definitions of "module" end up conflicting. If I build my server.ts file by itself using tsc (which references node.d.ts), it builds fine. The two should never actually coincide and so for me isn't really a conflict except it's becoming one in grunt-typescript which seems to dump all the *.d.ts files together as it's compiling. I assume this is because it's building all of my *.ts files together and so ends up pulling the *.d.ts files together into a common space.
The error I get:
c:/node/bills/typings/node/node.d.ts(37,13): error TS2134: Subsequent variable declarations must have the same type. Variable 'module' must be of type '(...modules: any[]) => any', but here has type '{ exports: any; require(id: string): any; id: string; filename: string; loaded: boolean; parent: any; children: any[]; }'.
angular-mocks.d.ts "module" definition:
declare var module: (...modules: any[]) => any;
node.d.ts "module" definition:
declare var module: {
exports: any;
require(id: string): any;
id: string;
filename: string;
loaded: boolean;
parent: any;
children: any[];
}