Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Subscription

Hierarchy

  • Subscription

Index

Methods

Methods

cancel

  • cancel(): void
  • Cancel the subscription. This stops your callback from being triggered when this topic is published.

    const mysub = eventbus.subscribe('sitapati.highscore', (score) => {
         if (score === "-1") {
             return mysub.cancel(); // Stop listening to this topic.
         }
         magik.dixit(`High score is ${score`);
    });
    
    memberof

    Subscription

    Returns void

Generated using TypeDoc