Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents an event subscription, and a safe way to cancel it.

see

cancel

Hierarchy

  • Subscription

Index

Properties

Accessors

Methods

Properties

Optional Readonly name

name: string

Subscription's name option, if it was set with method subscribe.

Accessors

live

  • get live(): boolean
  • Indicates whether the subscription is live / active.

    It can be useful to subscribers when cancelAll is used without their knowledge.

    Returns boolean

Methods

cancel

  • cancel(): boolean
  • Cancels the live subscription. The subscriber won't receive any more events.

    It also sets flag live to false.

    see

    cancelAll

    Returns boolean

    • true - subscription has been successfully cancelled
    • false - nothing happened, as subscription wasn't live

Legend

  • Property
  • Method
  • Property
  • Inherited method

Generated using TypeDoc