Closed
Description
Right now each of the operator modules contain both the operator implementation AND the Observable-patching side effect logic. This prevents smart people like me from being able to safely import an operator without polluting the Observable
prototype.
I think the right default behavior is to keep the side-effect-producing modules named as they already are, in the operators
folder, and import from a "raw" module that exports the operator implementation.
I propose adding an implementation
folder inside operators
to contain actual implementations.
|- rxjs/
|-- operators/
|---- implementation/
|------ map.ts - actual implementation with no side effects
|---- map.ts // Just imports the raw `map` operator and patches it onto Observable