-
Notifications
You must be signed in to change notification settings - Fork 274
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
refactor(subject): Subject.stream
now returns a read-only Stream
#699
Conversation
Subject.stream
getter testsSubject.stream
s now return read-only streams
Codecov Report
@@ Coverage Diff @@
## master #699 +/- ##
==========================================
- Coverage 93.74% 93.14% -0.60%
==========================================
Files 77 77
Lines 2334 2378 +44
==========================================
+ Hits 2188 2215 +27
- Misses 146 163 +17 |
Subject.stream
s now return read-only streamsSubject.stream
s now return read-only Stream
s
Subject.stream
s now return read-only Stream
sSubject.stream
now returns a read-only Stream
I would prefer to leave this sort of thing the responsibility of static type checking. Adding defensive programming here increases the binary size and slightly adds to the computation time, whereas static type checking serves the same purpose but costs nothing at runtime. What I mean regarding the static typing is that the return type of |
Subject.stream
is identical to Subject).ReplaySubject<T>.stream
toReplayStream<T>