SubscriptionSet.d.ts 484 B

1234567891011121314
  1. import { CommandNameFlags } from "./Command";
  2. declare type AddSet = CommandNameFlags["ENTER_SUBSCRIBER_MODE"][number];
  3. declare type DelSet = CommandNameFlags["EXIT_SUBSCRIBER_MODE"][number];
  4. /**
  5. * Tiny class to simplify dealing with subscription set
  6. */
  7. export default class SubscriptionSet {
  8. private set;
  9. add(set: AddSet, channel: string): void;
  10. del(set: DelSet, channel: string): void;
  11. channels(set: AddSet | DelSet): string[];
  12. isEmpty(): boolean;
  13. }
  14. export {};