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 observable (the symbol) under a different name or location. #6489

Closed
benlesh opened this issue Jun 21, 2021 · 1 comment · Fixed by #6545
Closed

Export observable (the symbol) under a different name or location. #6489

benlesh opened this issue Jun 21, 2021 · 1 comment · Fixed by #6545
Assignees
Labels
7.x Issues and PRs for version 7.x 8.x Issues and PRs for version 8.x

Comments

@benlesh
Copy link
Member

benlesh commented Jun 21, 2021

I think this is unfortunate, because we might want to export something else as observable, and it's a bit confusing for people at times I imagine:

import { observable } from 'rxjs';

console.log(observable); // symbol

We're currently exporting our copy of Symbol.observable as observable from the main module. I think we should rename it, remove it, or move it under something else.

Options:

  1. Export it as observableSymbol or OBSERVABLE_SYMBOL
  2. Don't export it at all, and advise people to use a package like symbol-observable
  3. Export it as a static property of Observable or something. like Observable.SYMBOL. (minimal overhead there, it's more of stylistic thing, I'm not saying I like it. Just an option)
  4. ???? Something else.

In all cases we'd have to leave the observable export for the duration of 7.x, and simply deprecate it.

@benlesh benlesh added AGENDA ITEM Flagged for discussion at core team meetings 7.x Issues and PRs for version 7.x 8.x Issues and PRs for version 8.x labels Jun 21, 2021
@benlesh
Copy link
Member Author

benlesh commented Jul 14, 2021

Core team meeting: 2.5 votes to deprecate and remove. 0 dissenters.

@benlesh benlesh removed the AGENDA ITEM Flagged for discussion at core team meetings label Jul 14, 2021
@benlesh benlesh self-assigned this Jul 14, 2021
benlesh added a commit to benlesh/rxjs that referenced this issue Aug 2, 2021
benlesh added a commit that referenced this issue Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.x Issues and PRs for version 7.x 8.x Issues and PRs for version 8.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant