TypescriptでDuplicate identifierエラーが大量にでたときの対応メモ

Typescriptで、コンパイル時に大量のエラーが発生しました。
Typescriptのバージョンの問題のようで、1.5を使用すると大量のエラーが発生。
1.4に戻したらエラーは発生しませんでした。

```
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3856,5): error TS2300: Duplicate identifier 'fftSize'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3857,5): error TS2300: Duplicate identifier 'frequencyBinCount'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3858,5): error TS2300: Duplicate identifier 'maxDecibels'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3859,5): error TS2300: Duplicate identifier 'minDecibels'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3860,5): error TS2300: Duplicate identifier 'smoothingTimeConstant'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3947,5): error TS2300: Duplicate identifier 'duration'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3948,5): error TS2300: Duplicate identifier 'length'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3949,5): error TS2300: Duplicate identifier 'numberOfChannels'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3950,5): error TS2300: Duplicate identifier 'sampleRate'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3960,5): error TS2300: Duplicate identifier 'buffer'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3961,5): error TS2300: Duplicate identifier 'loop'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3962,5): error TS2300: Duplicate identifier 'loopEnd'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3963,5): error TS2300: Duplicate identifier 'loopStart'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3964,5): error TS2300: Duplicate identifier 'onended'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3965,5): error TS2300: Duplicate identifier 'playbackRate'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3978,5): error TS2300: Duplicate identifier 'currentTime'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3979,5): error TS2300: Duplicate identifier 'destination'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3980,5): error TS2300: Duplicate identifier 'listener'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(3981,5): error TS2300: Duplicate identifier 'sampleRate'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4017,5): error TS2300: Duplicate identifier 'dopplerFactor'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4018,5): error TS2300: Duplicate identifier 'speedOfSound'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4030,5): error TS2300: Duplicate identifier 'channelCount'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4031,5): error TS2300: Duplicate identifier 'channelCountMode'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4032,5): error TS2300: Duplicate identifier 'channelInterpretation'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4033,5): error TS2300: Duplicate identifier 'context'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4034,5): error TS2300: Duplicate identifier 'numberOfInputs'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4035,5): error TS2300: Duplicate identifier 'numberOfOutputs'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4046,5): error TS2300: Duplicate identifier 'defaultValue'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4047,5): error TS2300: Duplicate identifier 'value'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4062,5): error TS2300: Duplicate identifier 'inputBuffer'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4063,5): error TS2300: Duplicate identifier 'outputBuffer'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4064,5): error TS2300: Duplicate identifier 'playbackTime'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4124,5): error TS2300: Duplicate identifier 'Q'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4126,5): error TS2300: Duplicate identifier 'frequency'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4127,5): error TS2300: Duplicate identifier 'gain'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4128,5): error TS2300: Duplicate identifier 'type'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4930,5): error TS2300: Duplicate identifier 'buffer'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(4931,5): error TS2300: Duplicate identifier 'normalize'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(5203,5): error TS2300: Duplicate identifier 'delayTime'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(6312,5): error TS2300: Duplicate identifier 'attack'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(6313,5): error TS2300: Duplicate identifier 'knee'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(6314,5): error TS2300: Duplicate identifier 'ratio'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(6315,5): error TS2300: Duplicate identifier 'reduction'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(6316,5): error TS2300: Duplicate identifier 'release'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(6317,5): error TS2300: Duplicate identifier 'threshold'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(6742,5): error TS2300: Duplicate identifier 'gain'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(11736,5): error TS2300: Duplicate identifier 'renderedBuffer'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(11745,5): error TS2300: Duplicate identifier 'oncomplete'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(11757,5): error TS2300: Duplicate identifier 'detune'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(11758,5): error TS2300: Duplicate identifier 'frequency'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(11759,5): error TS2300: Duplicate identifier 'onended'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(11760,5): error TS2300: Duplicate identifier 'type'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(11783,5): error TS2300: Duplicate identifier 'coneInnerAngle'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(11784,5): error TS2300: Duplicate identifier 'coneOuterAngle'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(11785,5): error TS2300: Duplicate identifier 'coneOuterGain'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(11786,5): error TS2300: Duplicate identifier 'distanceModel'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(11787,5): error TS2300: Duplicate identifier 'maxDistance'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(11788,5): error TS2300: Duplicate identifier 'panningModel'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(11789,5): error TS2300: Duplicate identifier 'refDistance'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(11790,5): error TS2300: Duplicate identifier 'rolloffFactor'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(13965,5): error TS2300: Duplicate identifier 'bufferSize'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(13966,5): error TS2300: Duplicate identifier 'onaudioprocess'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(14574,5): error TS2300: Duplicate identifier 'curve'.
/usr/local/lib/node_modules/typescript/bin/lib.d.ts(14575,5): error TS2300: Duplicate identifier 'oversample'.
lib/typings/webaudioapi/waa.d.ts(19,5): error TS2300: Duplicate identifier 'destination'.
lib/typings/webaudioapi/waa.d.ts(24,5): error TS2300: Duplicate identifier 'sampleRate'.
lib/typings/webaudioapi/waa.d.ts(29,5): error TS2300: Duplicate identifier 'currentTime'.
lib/typings/webaudioapi/waa.d.ts(34,5): error TS2300: Duplicate identifier 'listener'.
lib/typings/webaudioapi/waa.d.ts(169,13): error TS2403: Subsequent variable declarations must have the same type.  Variable 'AudioContext' must be of type '{ new (): AudioContext; prototype: AudioContext; }', but here has type 'new () => AudioContext'.
lib/typings/webaudioapi/waa.d.ts(184,5): error TS2300: Duplicate identifier 'oncomplete'.
lib/typings/webaudioapi/waa.d.ts(187,13): error TS2403: Subsequent variable declarations must have the same type.  Variable 'OfflineAudioContext' must be of type '{ new (numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext; protot...', but here has type 'new (numberOfChannels: number, length: number, sampleRate: number) => OfflineAudioContext'.
lib/typings/webaudioapi/waa.d.ts(199,5): error TS2300: Duplicate identifier 'renderedBuffer'.
lib/typings/webaudioapi/waa.d.ts(284,5): error TS2300: Duplicate identifier 'context'.
lib/typings/webaudioapi/waa.d.ts(289,5): error TS2300: Duplicate identifier 'numberOfInputs'.
lib/typings/webaudioapi/waa.d.ts(294,5): error TS2300: Duplicate identifier 'numberOfOutputs'.
lib/typings/webaudioapi/waa.d.ts(299,5): error TS2300: Duplicate identifier 'channelCount'.
lib/typings/webaudioapi/waa.d.ts(306,5): error TS2300: Duplicate identifier 'channelCountMode'.
lib/typings/webaudioapi/waa.d.ts(313,5): error TS2300: Duplicate identifier 'channelInterpretation'.
lib/typings/webaudioapi/waa.d.ts(361,5): error TS2300: Duplicate identifier 'value'.
lib/typings/webaudioapi/waa.d.ts(376,5): error TS2300: Duplicate identifier 'defaultValue'.
lib/typings/webaudioapi/waa.d.ts(483,5): error TS2300: Duplicate identifier 'gain'.
lib/typings/webaudioapi/waa.d.ts(498,5): error TS2300: Duplicate identifier 'delayTime'.
lib/typings/webaudioapi/waa.d.ts(511,5): error TS2300: Duplicate identifier 'sampleRate'.
lib/typings/webaudioapi/waa.d.ts(517,5): error TS2300: Duplicate identifier 'length'.
lib/typings/webaudioapi/waa.d.ts(523,5): error TS2300: Duplicate identifier 'duration'.
lib/typings/webaudioapi/waa.d.ts(529,5): error TS2300: Duplicate identifier 'numberOfChannels'.
lib/typings/webaudioapi/waa.d.ts(551,5): error TS2300: Duplicate identifier 'buffer'.
lib/typings/webaudioapi/waa.d.ts(556,5): error TS2300: Duplicate identifier 'playbackRate'.
lib/typings/webaudioapi/waa.d.ts(561,5): error TS2300: Duplicate identifier 'loop'.
lib/typings/webaudioapi/waa.d.ts(566,5): error TS2300: Duplicate identifier 'loopStart'.
lib/typings/webaudioapi/waa.d.ts(571,5): error TS2300: Duplicate identifier 'loopEnd'.
lib/typings/webaudioapi/waa.d.ts(576,5): error TS2300: Duplicate identifier 'onended'.
lib/typings/webaudioapi/waa.d.ts(624,5): error TS2300: Duplicate identifier 'onaudioprocess'.
lib/typings/webaudioapi/waa.d.ts(629,5): error TS2300: Duplicate identifier 'bufferSize'.
lib/typings/webaudioapi/waa.d.ts(641,5): error TS2300: Duplicate identifier 'playbackTime'.
lib/typings/webaudioapi/waa.d.ts(646,5): error TS2300: Duplicate identifier 'inputBuffer'.
lib/typings/webaudioapi/waa.d.ts(651,5): error TS2300: Duplicate identifier 'outputBuffer'.
lib/typings/webaudioapi/waa.d.ts(700,5): error TS2300: Duplicate identifier 'panningModel'.
lib/typings/webaudioapi/waa.d.ts(738,5): error TS2300: Duplicate identifier 'distanceModel'.
lib/typings/webaudioapi/waa.d.ts(743,5): error TS2300: Duplicate identifier 'refDistance'.
lib/typings/webaudioapi/waa.d.ts(748,5): error TS2300: Duplicate identifier 'maxDistance'.
lib/typings/webaudioapi/waa.d.ts(753,5): error TS2300: Duplicate identifier 'rolloffFactor'.
lib/typings/webaudioapi/waa.d.ts(758,5): error TS2300: Duplicate identifier 'coneInnerAngle'.
lib/typings/webaudioapi/waa.d.ts(763,5): error TS2300: Duplicate identifier 'coneOuterAngle'.
lib/typings/webaudioapi/waa.d.ts(768,5): error TS2300: Duplicate identifier 'coneOuterGain'.
lib/typings/webaudioapi/waa.d.ts(778,5): error TS2300: Duplicate identifier 'dopplerFactor'.
lib/typings/webaudioapi/waa.d.ts(783,5): error TS2300: Duplicate identifier 'speedOfSound'.
lib/typings/webaudioapi/waa.d.ts(829,5): error TS2300: Duplicate identifier 'buffer'.
lib/typings/webaudioapi/waa.d.ts(834,5): error TS2300: Duplicate identifier 'normalize'.
lib/typings/webaudioapi/waa.d.ts(865,5): error TS2300: Duplicate identifier 'fftSize'.
lib/typings/webaudioapi/waa.d.ts(870,5): error TS2300: Duplicate identifier 'frequencyBinCount'.
lib/typings/webaudioapi/waa.d.ts(875,5): error TS2300: Duplicate identifier 'minDecibels'.
lib/typings/webaudioapi/waa.d.ts(880,5): error TS2300: Duplicate identifier 'maxDecibels'.
lib/typings/webaudioapi/waa.d.ts(885,5): error TS2300: Duplicate identifier 'smoothingTimeConstant'.
lib/typings/webaudioapi/waa.d.ts(918,5): error TS2300: Duplicate identifier 'threshold'.
lib/typings/webaudioapi/waa.d.ts(923,5): error TS2300: Duplicate identifier 'knee'.
lib/typings/webaudioapi/waa.d.ts(928,5): error TS2300: Duplicate identifier 'ratio'.
lib/typings/webaudioapi/waa.d.ts(933,5): error TS2300: Duplicate identifier 'reduction'.
lib/typings/webaudioapi/waa.d.ts(938,5): error TS2300: Duplicate identifier 'attack'.
lib/typings/webaudioapi/waa.d.ts(943,5): error TS2300: Duplicate identifier 'release'.
lib/typings/webaudioapi/waa.d.ts(1066,5): error TS2300: Duplicate identifier 'type'.
lib/typings/webaudioapi/waa.d.ts(1067,5): error TS2300: Duplicate identifier 'frequency'.
lib/typings/webaudioapi/waa.d.ts(1068,5): error TS2300: Duplicate identifier 'Q'.
lib/typings/webaudioapi/waa.d.ts(1069,5): error TS2300: Duplicate identifier 'gain'.
lib/typings/webaudioapi/waa.d.ts(1098,5): error TS2300: Duplicate identifier 'curve'.
lib/typings/webaudioapi/waa.d.ts(1111,5): error TS2300: Duplicate identifier 'oversample'.
lib/typings/webaudioapi/waa.d.ts(1146,5): error TS2300: Duplicate identifier 'type'.
lib/typings/webaudioapi/waa.d.ts(1152,5): error TS2300: Duplicate identifier 'frequency'.
lib/typings/webaudioapi/waa.d.ts(1157,5): error TS2300: Duplicate identifier 'detune'.
lib/typings/webaudioapi/waa.d.ts(1177,5): error TS2300: Duplicate identifier 'onended'.
```
##Typescrptバージョンを指定してインストール
1.4をインストールする場合。
```
sudo npm install -g typescript@1.4
```