Skip to content

Using Subjects as Observers #825

Closed
Closed
@staltz

Description

@staltz

I think this is a bug. Currently RxJS 5 Subjects cannot be used as Observers in source.subscribe(subject), even though Subject implements the Observer interface.

// Rx 5
observable.subscribe(
  subject.next.bind(subject),
  subject.error.bind(subject),
  subject.complete.bind(subject)
)

//Rx 4
observable.subscribe(subject.asObserver())

This should be simple to fix, but should be accompanied by tests too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions