TS2300: Duplicate identifier 'export=' error when use Electron in TypeScript


I wrote two TypeScript files and use electron render and electron main type definitions,
the codes are below.


/// <reference path="./typings/github-electron/github-electron-renderer.d.ts" />

import ipc = require('ipc');

export class Rend {
	sendDataToMain(command, data) {
		ipc.send('main-channel', 'signal', command, data);


/// <reference path="./typings/github-electron/github-electron-main.d.ts" />

//import ipc = require('ipc');

export class Main {
	foo(event, status) {



	"compilerOptions": {
		"target": "ES5",
		"module": "commonjs",
		"sourceMap": true,
		"watch": true,
		"outDir": "./js/"
	"exclude": [

The problem is when build TypeScript files use command tsc -w,
the console shows the error below, while in fact the js files are generated successfully.

	Error:(7, 7) TS2339: Property 'send' does not exist on type 'EventEmitter'.
	Error:(229, 2) TS2300: Duplicate identifier 'export='.
	Error:(99, 2) TS2300: Duplicate identifier 'export='.

If i delete file main.ts or just delete the reference path line from main.ts,
the error above will disappear.

I looks like if use github-electron-renderer.d.ts and github-electron-main.d.ts in one project,
this problem will occurs, even though they are not reference in one TypeScript file.

tsc version 1.6.2


I experience this issue too. I suppose the workaround is to have two tsconfigs and folder structures to separate code belonging to main vs renderer processes…
Not a bad idea anyway…