var e = class {
  constructor() {
    this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
  }
  subscribe(s) {
    return this.listeners.add(s), this.onSubscribe(), () => {
      this.listeners.delete(s), this.onUnsubscribe();
    };
  }
  hasListeners() {
    return this.listeners.size > 0;
  }
  onSubscribe() {
  }
  onUnsubscribe() {
  }
};
export {
  e as Subscribable
};
//# sourceMappingURL=subscribable.js.map
