Class EntityBase<TProperties>Abstract

Default implementation of an Entity that supports observability, serialization, and async initialization.

Type Parameters

Hierarchy (view full)

Implements

Constructors

Properties

_id: string

The unique ID for this entity. Once set, this should never change.

_itemType: string

The item type for this entity when it participates in an App.

Accessors

  • get id(): string
  • The unique ID for this entity.

    Returns string

  • get itemType(): string
  • The item type for this entity when it participates in an App.

    Returns string

Methods

  • Called to perform cleanup. Subclasses should override this method rather than destroy() to perform custom cleanup.

    Returns Promise<void>

  • Called after normal initialization. Note: Child items are initialized before this is called.

    Returns Promise<void>

  • A clean-up function that should get called whenever the item is disposed of.

    Returns Promise<void>

  • Emits an event on the instance.

    Parameters

    Returns boolean

  • Registers an event handler on the instance.

    Parameters

    Returns IHandle

  • Creates an item:// URI reference to this entity.

    Returns string