Options
All
  • Public
  • Public/Protected
  • All
Menu

Base class for observable entitites.

export
class

ObservableEntity

Hierarchy

  • ObservableEntity

Index

Constructors

Protected constructor

Properties

Private _excludedProperties

_excludedProperties: Set<string> = new Set<string>()

Private _modifyListeners

_modifyListeners: Subject<INotifyInfo>[] = []

Accessors

modifyListeners

modifyListeners:

Array of listeners to observe property changes.

readonly
type

{Subject[]}

memberof

ObservableEntity

Methods

addExcludedProperties

  • addExcludedProperties(...properties: string[]): void
  • Provide names of properties that will not be observed.

    memberof

    ObservableEntity

    Parameters

    • Rest ...properties: string[]

      Properties that will not be observed.

    Returns void

Protected proxify

  • proxify<TEntity>(item: TEntity): TEntity
  • Returns proxy of entity with listeners that can observe property changes. Call from ctor to return observable proxy.

    example

    constructor() { super(); return super.proxify(this); }

    template

    TEntity

    memberof

    ObservableEntity

    Type parameters

    • TEntity: any

    Parameters

    • item: TEntity

      Entity to be proxified.

    Returns TEntity

    Proxified entity.

Static proxify

  • proxify<TEntity>(ctor: object): TEntity
  • Factory method for creating an observable entity. Returns proxy of entity with listeners that can observe property changes.

    static
    template

    TEntity

    memberof

    ObservableEntity

    Type parameters

    • TEntity: any

    Parameters

    • ctor: object

      Class name

    Returns TEntity

    Entity proxy that is observable

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc