Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SafeSimpleEvent<Argument>

An object which enables subscribing and unsubscribing from an event without exposing methods to fire the event.

Type parameters

  • Argument

Hierarchy

  • SafeSimpleEvent

Index

Methods

Methods

one

  • one(listener: function): void
  • Subscribes to the event with a listener which will only be called once.

    Parameters

    • listener: function

      The listener which will be added.

        • (arg: Argument): void
        • Parameters

          • arg: Argument

          Returns void

    Returns void

sub

  • sub(listener: function): void
  • Subscribe to the event.

    Parameters

    • listener: function

      The listener which will be added.

        • (arg: Argument): void
        • Parameters

          • arg: Argument

          Returns void

    Returns void

unsub

  • unsub(listener: function): void
  • Unsubscribes from the event.

    Parameters

    • listener: function

      The listener which will be removed.

        • (arg: Argument): void
        • Parameters

          • arg: Argument

          Returns void

    Returns void

Generated using TypeDoc