Consider un-deprecating Subject.isStopped #6462
Replies: 3 comments 2 replies
-
Can you use closed? Line 17 in f47425d |
Beta Was this translation helpful? Give feedback.
-
The thing that I think |
Beta Was this translation helpful? Give feedback.
-
if that is introduced, it should be similar how the interface Subject {
completed: boolean; // if true, broadcasting through this subject leads to stopped notifications
errored: boolean; // if true, broadcasting through this subject leads to stopped notifications
closed: boolean; // if true, broadcasting through this subject causes an error to be thrown
observed: boolean; // if true, someone will actually listen to broadcasts (unless we have special subjects)
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Since a Subject is the root multicast object in rx.js, it's useful to know whether it has completed or errored, and thus whether sending more items or an error to the Subject is going to do anything.
With
Subject.isStopped
now being deprecated in 7.x, it's become more effort to track the state of the Subject. Could you provide a getter with equivalent information?The best alternative I see is adding Subject/BehaviorSubject subclasses, or a wrapper that tracks the same, but I figure it's worth asking for.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions