Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Observer<T>

Represent an Observer registered to a given Observable object.

Type parameters

  • T

Hierarchy

  • Observer

Index

Constructors

constructor

  • new Observer(callback: (eventData: T, eventState: EventState) => void, mask: number, scope?: any): Observer
  • Creates a new observer

    Parameters

    • callback: (eventData: T, eventState: EventState) => void

      defines the callback to call when the observer is notified

        • Parameters

          Returns void

    • mask: number

      defines the mask of the observer (used to filter notifications)

    • Optional scope: any

      defines the current scope used to restore the JS context

    Returns Observer

Properties

callbackSearch playground for callback

callback: (eventData: T, eventState: EventState) => void

Defines the callback to call when the observer is notified

Type declaration

    • Parameters

      Returns void

maskSearch playground for mask

mask: number

Defines the mask of the observer (used to filter notifications)

scopeSearch playground for scope

scope: any

Defines the current scope used to restore the JS context

unregisterOnNextCallSearch playground for unregisterOnNextCall

unregisterOnNextCall: boolean

Gets or sets a property defining that the observer as to be unregistered after the next notification

Legend

  • Property
  • Method
  • Constructor
  • Property
  • Static method