{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1986","repository_url":"https://api.github.com/repos/ReactiveX/rxjs","labels_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1986/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1986/comments","events_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1986/events","html_url":"https://github.com/ReactiveX/rxjs/issues/1986","id":179601745,"number":1986,"title":"TypeScript complains about DOM types when compiling for Node","user":{"login":"pleerock","id":1753397,"avatar_url":"https://avatars.githubusercontent.com/u/1753397?v=3","gravatar_id":"","url":"https://api.github.com/users/pleerock","html_url":"https://github.com/pleerock","followers_url":"https://api.github.com/users/pleerock/followers","following_url":"https://api.github.com/users/pleerock/following{/other_user}","gists_url":"https://api.github.com/users/pleerock/gists{/gist_id}","starred_url":"https://api.github.com/users/pleerock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pleerock/subscriptions","organizations_url":"https://api.github.com/users/pleerock/orgs","repos_url":"https://api.github.com/users/pleerock/repos","events_url":"https://api.github.com/users/pleerock/events{/privacy}","received_events_url":"https://api.github.com/users/pleerock/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-09-27T20:18:05Z","updated_at":"2016-10-04T13:36:34Z","closed_at":null,"body":"rxjs version: **^5.0.0-beta.12**\r\ntypescript version: **2.0.2**\r\n\r\nI have such errors:\r\n```\r\nnode_modules/rxjs/observable/FromEventObservable.d.ts(11,39): error TS2304: Cannot find name 'EventTarget'.\r\nnode_modules/rxjs/observable/FromEventObservable.d.ts(11,104): error TS2304: Cannot find name 'NodeList'.\r\nnode_modules/rxjs/observable/FromEventObservable.d.ts(11,115): error TS2304: Cannot find name 'HTMLCollection'.\r\nnode_modules/rxjs/observable/dom/AjaxObservable.d.ts(16,23): error TS2304: Cannot find name 'XMLHttpRequest'.\r\nnode_modules/rxjs/observable/dom/AjaxObservable.d.ts(75,59): error TS2304: Cannot find name 'Event'.\r\nnode_modules/rxjs/observable/dom/AjaxObservable.d.ts(80,13): error TS2304: Cannot find name 'Event'.\r\nnode_modules/rxjs/observable/dom/AjaxObservable.d.ts(95,20): error TS2304: Cannot find name 'Event'.\r\nnode_modules/rxjs/observable/dom/AjaxObservable.d.ts(96,10): error TS2304: Cannot find name 'XMLHttpRequest'.\r\nnode_modules/rxjs/observable/dom/AjaxObservable.d.ts(106,32): error TS2304: Cannot find name 'Event'.\r\nnode_modules/rxjs/observable/dom/AjaxObservable.d.ts(106,44): error TS2304: Cannot find name 'XMLHttpRequest'.\r\nnode_modules/rxjs/observable/dom/AjaxObservable.d.ts(117,10): error TS2304: Cannot find name 'XMLHttpRequest'.\r\nnode_modules/rxjs/observable/dom/AjaxObservable.d.ts(122,39): error TS2304: Cannot find name 'XMLHttpRequest'.\r\nnode_modules/rxjs/observable/dom/AjaxObservable.d.ts(130,22): error TS2304: Cannot find name 'XMLHttpRequest'.\r\nnode_modules/rxjs/observable/dom/WebSocketSubject.d.ts(10,29): error TS2304: Cannot find name 'MessageEvent'.\r\nnode_modules/rxjs/observable/dom/WebSocketSubject.d.ts(11,33): error TS2304: Cannot find name 'Event'.\r\nnode_modules/rxjs/observable/dom/WebSocketSubject.d.ts(12,34): error TS2304: Cannot find name 'CloseEvent'.\r\nnode_modules/rxjs/observable/dom/WebSocketSubject.d.ts(15,63): error TS2304: Cannot find name 'WebSocket'.\r\nnode_modules/rxjs/observable/dom/WebSocketSubject.d.ts(26,13): error TS2304: Cannot find name 'WebSocket'.\r\nnode_modules/rxjs/observable/dom/WebSocketSubject.d.ts(27,32): error TS2304: Cannot find name 'Event'.\r\nnode_modules/rxjs/observable/dom/WebSocketSubject.d.ts(28,33): error TS2304: Cannot find name 'CloseEvent'.\r\nnode_modules/rxjs/observable/dom/WebSocketSubject.d.ts(31,63): error TS2304: Cannot find name 'WebSocket'.\r\nnode_modules/rxjs/observable/dom/WebSocketSubject.d.ts(34,23): error TS2304: Cannot find name 'MessageEvent'.\r\n```\r\n\r\nWhy do I have this error? Because I haven't added `\"dom\"` to the `\"lib\"` section of the `\"compilerOptions\"`. Why I haven't added it? Because I don't need dom, Im using rxjs in the backend, I don't need browser stuff."},"comment":{"url":"https://api.github.com/repos/ReactiveX/rxjs/issues/comments/251389466","html_url":"https://github.com/ReactiveX/rxjs/issues/1986#issuecomment-251389466","issue_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1986","id":251389466,"user":{"login":"david-driscoll","id":1269157,"avatar_url":"https://avatars.githubusercontent.com/u/1269157?v=3","gravatar_id":"","url":"https://api.github.com/users/david-driscoll","html_url":"https://github.com/david-driscoll","followers_url":"https://api.github.com/users/david-driscoll/followers","following_url":"https://api.github.com/users/david-driscoll/following{/other_user}","gists_url":"https://api.github.com/users/david-driscoll/gists{/gist_id}","starred_url":"https://api.github.com/users/david-driscoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-driscoll/subscriptions","organizations_url":"https://api.github.com/users/david-driscoll/orgs","repos_url":"https://api.github.com/users/david-driscoll/repos","events_url":"https://api.github.com/users/david-driscoll/events{/privacy}","received_events_url":"https://api.github.com/users/david-driscoll/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T13:36:34Z","updated_at":"2016-10-04T13:36:34Z","body":"@blesh \r\n\r\n1. We could exclude the dom types, and instead create our own that mirror those.  \r\nThis limits our ability to expand on the types such as offering string typing based on the event string, such as mapping `mouseover` -> `MouseEvent` automatically.\r\n\r\n2. We could exclude the dom types from the default export `Rx.ts` and instead create another `dom.ts`, which then exports the defaults from `Rx`.   This is very similar to what we had before with `Rx.Dom.ts`.  This would allow a user that needs the dom methods to do `import * as Rx from 'rxjs/dom'` / `require('rxjs/dom')`.\r\n\r\n3. Create a separate `rxjs-dom` package which is basically like `#2` except an explict new dependency.\r\n\r\nI'm thinking `#2` is a good compromise for the time being."}}
{"actor":{"display_login":"david-driscoll"}}