A subscriber's type.
Returns a number of subscribers in the collection.
Returns an iterator that allows to iterate through all subscribers.
Removes all subscribers from the collection.
Adds a subscriber to the collection.
Removes a subscriber from the collection. Does nothing if provided subscriber wasn't subscribed first.
Generated using TypeDoc
This class is an iterable collection of generic subscribers. You can iterate through this collection using the for ... of loop.
import { SubscribersSet } from '@hubhazard/core'; const subscribers = new SubscribersSet<string>(); // ... for (const subscriber of subscribers) { console.log(`Handling subscriber: ${subscriber}`); }