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

Make AnonymousSubject public #227

Closed
metrofun opened this issue Jul 29, 2014 · 1 comment
Closed

Make AnonymousSubject public #227

metrofun opened this issue Jul 29, 2014 · 1 comment

Comments

@metrofun
Copy link

AnonymousSubject seems to be a good starting point for creating our own Subjects by simple inheritance. For example:

function ThroughSubject(throughFunc) {
    var observer = new Rx.Subject();
    AnonymousSubject.call(this, observer, observer.map(throughFunc));
}
ThroughSubject.prototype = Object.create(AnonymousSubject.prototype, {
    constructor: {value: ThroughSubject}
});

Obviously the problem with the factory Rx.Subject.create is an inability to add anything to the prototype.

mattpodwysocki added a commit that referenced this issue Jul 29, 2014
@mattpodwysocki
Copy link
Member

@metrofun checked in and will be made available as Rx.AnonymousSubject

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants