Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Rx.Observable.prototype.manySelect() error behavior #1358

@manbaum

Description

@manbaum

The following code is adaped from What does the new ManySelect operator do?

var projection = ["a", "b", "c"];
var count = 0;
Rx.Observable.range(1, 3)
  .do(Rx.Observer.create(
    x  => console.log(`Generate Next ${x}`),
    e  => console.log(`Generate Error ${e.message}`),
    () => console.log(`Generate Completed`)
  ))
  .manySelect(ys => {
    var k = ++count;
    return ys.map(x => `${k}, ${projection[x - 1]}`);
  })
  .mergeAll()
  .subscribe(Rx.Observer.create(
    x  => console.log(`Next ${x}`),
    e  => console.log(`Error ${e.message}`),
    () => console.log(`Completed`)
  ));

According to the documentation of manySelect(), the code above should produce the output like below:

"Generate Next 1"
"Generate Next 2"
"Next 1, a"
"Generate Next 3"
"Next 1, b"
"Next 2, b"
"Generate Completed"
"Next 1, c"
"Next 2, c"
"Next 3, c"
"Completed"

But actually, it gives the following result:

"Generate Next 1"
"Next 1, a"
"Generate Next 2"
"Error innerSource.subscribe is not a function"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions