question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rx.Observable.merge seems to return an array not a new observable

See original GitHub issue

Not sure if this is a doc bug or library bug but

Rx.Observable.merge seems to return an array not a new observable

but the docs say:

signature: merge(input: Observable): Observable

Turn multiple observables into a single observable.
Rx.Observable.timer(1)

here is my proof:

screenshot from 2017-01-09 20-32-26

lastly I want to say thank you for these docs, hopefully I am right about this bug, and in that case very willing to tolerate a little bit of wonkiness for a bit, thanks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
btronconecommented, Jan 12, 2017

Hello,

It looks like you are calling it wrong. merge takes a variable number of observables, not an array. Try calling it like this:

const example = Rx.Observable.of(
 Rx.Observable.timer(1),
 Rx.Observable.timer(1),
 Rx.Observable.timer(1)
)

This should give you the correct behavior. 👍

0reactions
ORESoftwarecommented, Jan 12, 2017

I did submit an issue, we will see what they say

https://github.com/ReactiveX/rxjs/issues/2274

thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rx.Observable.merge is not accepting Array of ... - GitHub
In RC1 passing an array into merge still returns a nested Observable as stated in the original issue. 2
Read more >
How to merge an array of Observables into a single ...
I'm stuck at the return merge(observableRequests) part as I can't get the return type right and I'm not too versed in Rxjs functions....
Read more >
merge multiple observables to an observable array - MSDN
Hi I am trying to merge a number of observables to an observable array. Here an example that works in fsi. (sorry that...
Read more >
5 helpful RxJS solutions. to everyday problems - Medium
RxJS is a javascript library that allows us to code reactively using observable streams. With observables and functions provided by RxJS we ...
Read more >
5 helpful RxJS solutions. to everyday problems - Medium
RxJS is a javascript library that allows us to code reactively using observable streams. With observables and functions provided by RxJS we ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found