Options
All
  • Public
  • Public/Protected
  • All
Menu

The ITrigger interface represents an object that keeps a value and notifies all attached wathers when this value changes.

Type parameters

  • T = any

    Type of the trigger value.

Hierarchy

Index

Methods

attach

  • Adds the given function as a listener to the event. Note that this cannot be a lambda function because there will be no way to remove a lambda function listener later.

    Parameters

    Returns void

detach

get

  • get(): T
  • Retrieves the current value

    Returns T

has

  • has(): boolean
  • Determines whether this event slot has any listeners.

    Returns boolean

set

  • set(v: T): void
  • Sets a new value

    Parameters

    • v: T

    Returns void