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

Observable constructor shouldn't give people a Subscriber<T> type. #2314

Closed
benlesh opened this issue Jan 29, 2017 · 3 comments
Closed

Observable constructor shouldn't give people a Subscriber<T> type. #2314

benlesh opened this issue Jan 29, 2017 · 3 comments
Labels
bug Confirmed bug TS Issues and PRs related purely to TypeScript issues

Comments

@benlesh
Copy link
Member

benlesh commented Jan 29, 2017

Subscriber<T> is really an implementation detail of this library. While I don't mind "power users" knowing it's there, I really don't recommend the everyday user use the Subscriber<T>'s non-Observer APIs.

We should be giving people an Observer type. Unfortunately at this point, it may be a breaking change and not a "fix"... even though it's really a "fix". It's not a particularly nasty one though, since people can still cast around it.

Upcoming changes to scheduling might break people that are using Subscriber's non-Observer APIs more than others who have stayed on the beaten path.

@benlesh
Copy link
Member Author

benlesh commented Jan 29, 2017

Related #2196

@benlesh benlesh added bug Confirmed bug type: discussion TS Issues and PRs related purely to TypeScript issues labels Jan 29, 2017
@kwonoj
Copy link
Member

kwonoj commented Apr 16, 2017

Related note, I think there are additional few places we're exposing implementation having additional details instead of interfaces. If we're going to make this change for next breaking changes, worth to visit possible cases and introduce at once.

@benlesh
Copy link
Member Author

benlesh commented Mar 31, 2021

I've long since changed my mind on this one.

@benlesh benlesh closed this as completed Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug TS Issues and PRs related purely to TypeScript issues
Projects
None yet
Development

No branches or pull requests

2 participants