Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export an operator subscriber for user-land operators and refine Observable ctor #5836

Closed
cartant opened this issue Oct 19, 2020 · 2 comments

Comments

@cartant
Copy link
Collaborator

cartant commented Oct 19, 2020

ATM, it's not possible - without subclassing Subscriber - for user-land operators to correctly chain the closed property of the subscriber received by the Observable ctor's callback.

We should export something like the internal OperatorSubscriber, to facilitate the more straightforward creation of user-land operators. IMO, we should export something that accepts callbacks using a config object - rather than the positional arguments.

Also, as raised in #2314, we should use a narrower type - e.g. a SubscriberLike - that does not expose as many implementation details as Subscriber.

@kwonoj
Copy link
Member

kwonoj commented Oct 19, 2020

Some months ago core team meeting had discussed similar to this - make Observable itself as strongly public interfaced one which can create operators, and all of rxjs operator itself try to utilize it to create operators instead of rely on some internals. Discussion concluded we'd like to setup monorepo-ish (yes, again) to make rxjs/Observable itself as explicitly seperated import site operators can import.

In my opinion, regardless of publishing rxjs/observable or not - it may worth to explore these paths in a long run. I wanted to try this after we get concluded how to organize our repo for separated packages. (then we can make observable as internal packages to all operator enforced to follow its public interfaces)

Not directly related, but I guess this is somewhat related topics.

@cartant cartant added the AGENDA ITEM Flagged for discussion at core team meetings label Oct 19, 2020
@cartant cartant removed the AGENDA ITEM Flagged for discussion at core team meetings label Oct 28, 2020
@cartant
Copy link
Collaborator Author

cartant commented Oct 28, 2020

Closed in favour of #5863.

@cartant cartant closed this as completed Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants