Las tipografías de RxJS5 TypeScript fallan

tsc en mi proyecto y obtengo estos errores relacionados con la lib RxJS5:

 $ tsc node_modules/rxjs/observable/FromEventObservable.d.ts(11,39): error TS2304: Cannot find name 'EventTarget'. node_modules/rxjs/observable/FromEventObservable.d.ts(11,103): error TS2304: Cannot find name 'NodeList'. node_modules/rxjs/observable/FromEventObservable.d.ts(11,114): error TS2304: Cannot find name 'HTMLCollection'. node_modules/rxjs/observable/dom/AjaxObservable.d.ts(16,23): error TS2304: Cannot find name 'XMLHttpRequest'. node_modules/rxjs/observable/dom/AjaxObservable.d.ts(77,59): error TS2304: Cannot find name 'Event'. node_modules/rxjs/observable/dom/AjaxObservable.d.ts(82,13): error TS2304: Cannot find name 'Event'. node_modules/rxjs/observable/dom/AjaxObservable.d.ts(97,20): error TS2304: Cannot find name 'Event'. node_modules/rxjs/observable/dom/AjaxObservable.d.ts(98,10): error TS2304: Cannot find name 'XMLHttpRequest'. node_modules/rxjs/observable/dom/AjaxObservable.d.ts(108,32): error TS2304: Cannot find name 'Event'. node_modules/rxjs/observable/dom/AjaxObservable.d.ts(108,44): error TS2304: Cannot find name 'XMLHttpRequest'. node_modules/rxjs/observable/dom/AjaxObservable.d.ts(119,10): error TS2304: Cannot find name 'XMLHttpRequest'. node_modules/rxjs/observable/dom/AjaxObservable.d.ts(128,39): error TS2304: Cannot find name 'XMLHttpRequest'. node_modules/rxjs/observable/dom/AjaxObservable.d.ts(136,22): error TS2304: Cannot find name 'XMLHttpRequest'. node_modules/rxjs/observable/dom/WebSocketSubject.d.ts(10,29): error TS2304: Cannot find name 'MessageEvent'. node_modules/rxjs/observable/dom/WebSocketSubject.d.ts(11,33): error TS2304: Cannot find name 'Event'. node_modules/rxjs/observable/dom/WebSocketSubject.d.ts(12,34): error TS2304: Cannot find name 'CloseEvent'. node_modules/rxjs/observable/dom/WebSocketSubject.d.ts(15,63): error TS2304: Cannot find name 'WebSocket'. node_modules/rxjs/observable/dom/WebSocketSubject.d.ts(27,13): error TS2304: Cannot find name 'WebSocket'. node_modules/rxjs/observable/dom/WebSocketSubject.d.ts(28,32): error TS2304: Cannot find name 'Event'. node_modules/rxjs/observable/dom/WebSocketSubject.d.ts(29,33): error TS2304: Cannot find name 'CloseEvent'. node_modules/rxjs/observable/dom/WebSocketSubject.d.ts(32,63): error TS2304: Cannot find name 'WebSocket'. node_modules/rxjs/observable/dom/WebSocketSubject.d.ts(36,23): error TS2304: Cannot find name 'MessageEvent'. 

¿Alguien sabe por qué ocurre esto? Este es mi archivo package.json:

 { "name": "oplog.rx", "version": "0.0.101", "description": "", "main": "index.js", "scripts": { "test": "sumn test" }, "repository": { "type": "git", "url": "git+https://github.com/ORESoftware/oplog.rx.git" }, "keywords": [ "oplog", "mongodb", "rx", "rxjs" ], "author": "Olegzandr VD", "license": "MIT", "bugs": { "url": "https://github.com/ORESoftware/oplog.rx/issues" }, "homepage": "https://github.com/ORESoftware/oplog.rx#readme", "dependencies": { "bson": "^2.0.4", "json-stdio": "0.0.1016", "mongodb": "^3.0.4", "rxjs": "^5.5.7" }, "devDependencies": { "@types/mongodb": "^3.0.8" } } 

tsconfig.json agregar "dom" a la configuración de lib en las tsconfig.json del compilerOptions su archivo tsconfig.json :

 "lib": ["dom", "es2015"] 

Alternativamente, puede usar la skipLibCheck compilerOption skipLibCheck para evitar la comprobación de archivos .d.ts dentro de node_modules :

 "skipLibCheck": true 

Vea este tema para una explicación.

Básicamente, la fábrica observable fromEvent compatible con las fonts de eventos Node y DOM, y TypeScript debe conocer los tipos de DOM.

Este PR debe resolver el problema.