8000 Consider making operators return `this.constructor`-typed objects, instead of native `Observable` · Issue #200 · WICG/observable · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Consider making operators return this.constructor-typed objects, instead of native Observable #200
Open
@domfarolino

Description

@domfarolino

See #178 (comment) and all of the discussion following it. This is required to support ease of subclassing, and it may be required to support buffering, which as @benlesh describes in the aforementioned issue, is important for BehaviorSubject.

If we decide this is a good thing to do, I prefer to treat it as a follow-up. It introduces a behavior change—operators called on Observable subclasses will suddenly start returning the subclassed type (as JS Arrays and I think other built-ins do), instead of platform Observables—but I think this is probably OK since if you're subclassing you're kind of voiding the warranty anyways. But since the ref counted producer issues are closing soon, we'll use this issue to track discussion on this topic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    possible future enhancementAn enhancement that doesn't block standardization or shipping

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0