{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1694","repository_url":"https://api.github.com/repos/ReactiveX/rxjs","labels_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1694/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1694/comments","events_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1694/events","html_url":"https://github.com/ReactiveX/rxjs/issues/1694","id":153605876,"number":1694,"title":"Property 'merge' does not exist on type 'typeof Observable'","user":{"login":"topheman","id":985982,"avatar_url":"https://avatars.githubusercontent.com/u/985982?v=3","gravatar_id":"","url":"https://api.github.com/users/topheman","html_url":"https://github.com/topheman","followers_url":"https://api.github.com/users/topheman/followers","following_url":"https://api.github.com/users/topheman/following{/other_user}","gists_url":"https://api.github.com/users/topheman/gists{/gist_id}","starred_url":"https://api.github.com/users/topheman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topheman/subscriptions","organizations_url":"https://api.github.com/users/topheman/orgs","repos_url":"https://api.github.com/users/topheman/repos","events_url":"https://api.github.com/users/topheman/events{/privacy}","received_events_url":"https://api.github.com/users/topheman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-07T17:15:36Z","updated_at":"2016-05-07T18:11:51Z","closed_at":"2016-05-07T18:11:50Z","body":"<!--\r\nThank you for raising your concerns, we appreciate your feedback and contributions to this repository.\r\n\r\nBefore you continue, consider the following:\r\n\r\nIf you have a \"How do I do ...?\" question, it is better for you and for us that this question is placed in [StackOverflow](http://stackoverflow.com/questions/tagged/rxjs5) or some chat channel. This way, you are making it easier for others to learn from your experiences too.\r\n\r\nThese \"Issues\" are meant only for technical problems, bugs, and proposals related to the library.\r\n\r\nIf your issue is a bug, please follow the format below:\r\n-->\r\n\r\n**RxJS version:**: Both v5.0.0-beta.6 & v5.0.0-beta.7\r\n\r\n**Code to reproduce:**\r\n\r\n```js\r\nimport {Observable} from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/interval';\r\nimport 'rxjs/add/operator/merge';\r\n// import {merge} from 'rxjs/operator/merge';\r\n\r\nconst minInterval = 500;\r\n\r\nexport const compileTickObservable = () => {\r\n\r\n  const intervals1$ = Observable.interval(minInterval)\r\n    .map(val => val * minInterval);\r\n\r\n  const intervals2$ = Observable.interval(minInterval)\r\n    .map(val => val * minInterval * 2);\r\n\r\n  // const matchedItems$ = merge.call(Observable, [\r\n  //   intervals1$,\r\n  //   intervals2$\r\n  // ]).map(val => val);\r\n\r\n  const matchedItems$ = Observable.merge(\r\n    intervals1$,\r\n    intervals2$\r\n  ).map(val => val);\r\n\r\n  return matchedItems$;\r\n};\r\n```\r\n\r\nRuns in Angular2, but is RxJS specific - brief version:\r\n```js\r\nimport {compileTickObservable}  from '../../store/observables/tick.ts'; // file above\r\n\r\nlet logs = [];\r\nconst tick$ = compileTickObservable();\r\nconst subTick = tick$.subscribe(item => {\r\n logs = [item, ...logs].slice(0, 15);\r\n});\r\n```\r\n\r\n**Error**:\r\n\r\nTypeScript compiler returns this error:\r\n\r\n```\r\n[default] /Users/Tophe/projects/front/angular2-sandbox/src/store/observables/tick.ts:21:36\r\n    Property 'merge' does not exist on type 'typeof Observable'.\r\n```\r\n\r\nRuntime error (The relevant part is **Observable.merge is not a function**)\r\n\r\n```\r\nEXCEPTION: Error: Uncaught (in promise): EXCEPTION: Error in :0:0\r\nORIGINAL EXCEPTION: TypeError: Observable_1.Observable.merge is not a function\r\nORIGINAL STACKTRACE:\r\nTypeError: Observable_1.Observable.merge is not a function\r\n    at Object.exports.compileTickObservable (http://localhost:8080/bundle.js:63538:50)\r\n    at new ColorInterval (http://localhost:8080/bundle.js:62596:33)\r\n    at DebugAppView._View_ColorInterval_Host0.createInternal (ColorInterval_Host.template.js:15:29)\r\n    at DebugAppView.AppView.create (http://localhost:8080/bundle.js:29952:22)\r\n    at DebugAppView.create (http://localhost:8080/bundle.js:30145:45)\r\n    at ComponentFactory.create (http://localhost:8080/bundle.js:26702:37)\r\n    at ViewContainerRef_.createComponent (http://localhost:8080/bundle.js:27353:46)\r\n    at http://localhost:8080/bundle.js:29221:30\r\n    at ZoneDelegate.invoke (http://localhost:8080/bundle.js:15917:30)\r\n    at Object.NgZoneImpl.inner.inner.fork.onInvoke (http://localhost:8080/bundle.js:26270:42)\r\n    at ZoneDelegate.invoke (http://localhost:8080/bundle.js:15916:36)\r\n    at Zone.run (http://localhost:8080/bundle.js:15810:45)\r\n    at http://localhost:8080/bundle.js:16165:59\r\n    at ZoneDelegate.invokeTask (http://localhost:8080/bundle.js:15950:39)\r\n    at Object.NgZoneImpl.inner.inner.fork.onInvokeTask (http://localhost:8080/bundle.js:26261:42)\r\n    at ZoneDelegate.invokeTask (http://localhost:8080/bundle.js:15949:44)\r\n    at Zone.runTask (http://localhost:8080/bundle.js:15850:49)\r\n    at drainMicroTaskQueue (http://localhost:8080/bundle.js:16068:37)\r\n    at run (http://localhost:8080/bundle.js:13208:23)\r\n    at http://localhost:8080/bundle.js:13221:29\r\n    at MutationObserver.flush (http://localhost:8080/bundle.js:13560:10)\r\nERROR CONTEXT:\r\n[object Object]\r\n````\r\n\r\n**Additional information:**\r\n\r\nAs you can see in the commented code, since I was told *Observable.merge is not a function*, I tried other ways to import and use it. But still, it could import `'rxjs/add/observable/interval'`.\r\n\r\nI've tried with both v5.0.0-beta.6 & v5.0.0-beta.7, if anyone has an idea ?..."},"comment":{"url":"https://api.github.com/repos/ReactiveX/rxjs/issues/comments/217656975","html_url":"https://github.com/ReactiveX/rxjs/issues/1694#issuecomment-217656975","issue_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1694","id":217656975,"user":{"login":"kwonoj","id":1210596,"avatar_url":"https://avatars.githubusercontent.com/u/1210596?v=3","gravatar_id":"","url":"https://api.github.com/users/kwonoj","html_url":"https://github.com/kwonoj","followers_url":"https://api.github.com/users/kwonoj/followers","following_url":"https://api.github.com/users/kwonoj/following{/other_user}","gists_url":"https://api.github.com/users/kwonoj/gists{/gist_id}","starred_url":"https://api.github.com/users/kwonoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwonoj/subscriptions","organizations_url":"https://api.github.com/users/kwonoj/orgs","repos_url":"https://api.github.com/users/kwonoj/repos","events_url":"https://api.github.com/users/kwonoj/events{/privacy}","received_events_url":"https://api.github.com/users/kwonoj/received_events","type":"User","site_admin":false},"created_at":"2016-05-07T18:11:50Z","updated_at":"2016-05-07T18:11:50Z","body":"In above snippet, you imported observable operator `'rxjs/add/operator/merge'` and tried to use static creation method `Observable.merge`, not able to find it. \r\n\r\n`operator` gives instance method to observables, such as\r\n```js\r\nimport 'rxjs/add/operator/merge';\r\n\r\nconst a = Observable.of(1);\r\na.merge(Observable.of(2)).subscribe(...);\r\n```\r\n\r\nwhile static method allows to create observable via\r\n```js\r\nimport 'rxjs/add/observable/merge';\r\n\r\nObservable.merge(Observable.of(1), Observable.of(2)).subscribe(...);\r\n```"}}