Class: SubSink
Utility class used for handling rxjs subscription in a gracefull manner.
Constructors​
constructor​
• new SubSink()
Properties​
subscriptions​
• Private
subscriptions: Subscription
[] = []
Defined in​
Accessors​
add​
• set
add(value
): void
Add a subscription to the pool of subscriptions. multiple calls can be made in succession, like
mySubSink = timer(500).subscribe();
mySubSink = timer(1000).subscribe();
.
This was done to avoid having to wrap a subscription in a method call, like
mySubSink.addInArray(timer(1000).subscribe());
Parameters​
Name | Type |
---|---|
value | Subscription |
Returns​
void
Defined in​
Methods​
empty​
â–¸ empty(): void
Unsuscribe from all the added subscriptions and empties the internal pool.
Returns​
void