Prefix internal operator functions to avoid bad imports
See original GitHub issueFeature Request
Is your feature request related to a problem? Please describe.
Importing operators & observables from the wrong path (rxjs/internal/operators/... instead rxjs/operators) of seems to be a common issue.
Cf. https://github.com/ReactiveX/rxjs/issues/4363 switchMap not unsubscribing depending on import of Observable
Describe the solution you’d like
Would that make sense to prefix these functions and classes with some special character (_ or ø) to avoid bad imports?
If yes, I’ll be glad to contribute.
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Linter rules - Dart programming language
Avoid relative imports for files in lib/ . This rule is available as of Dart 2.0.0. Rule sets: core, recommended, flutter. This rule...
Read more >Best Practices - Apache Airflow
Make sure to use variable with template in operator, not in the top level code. Bad example: from airflow.models import Variable foo_var = ......
Read more >What does __all__ mean in Python? - Stack Overflow
from foo import * print(bar) print(baz) # The following will trigger an exception, as "waz" is not exported by the module print(waz).
Read more >Functions, operators, and conditionals | BigQuery
This topic is a compilation of functions, operators, and conditional expressions. To learn more about how to call functions, function call rules, ...
Read more >Google Python Style Guide
Use from x import y where x is the package prefix and y is the module name with ... Avoid nested functions or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

IMO, the effort required to add prefixes would be better applied elsewhere.
I would favour abandoning the
"rxjs/operators"import location altogether and using"rxjs"for everything. This will be a possibility - in v7 - if the conflicting names - likeconcatandmerge- are resolved either via the removal of deprecated operators or the renaming of the operators tomergeWith, etc.We may need some reorg in future major versions eventually, but I don’t think we’ll apply this kind of prefix at least. Will closing and improve over version changes.