Class DataEntity<D, E>Abstract

Type Parameters

  • D
  • E extends { updated: string[] } = { updated: string[] }

Hierarchy (View Summary)

Constructors

Properties

Methods

Constructors

Properties

data: D
listeners: { [K in string | number | symbol]?: (data: E[K]) => void[] } = {}

Methods

  • Remove an event listener

    Type Parameters

    • T extends string | number | symbol

    Parameters

    • event: T
    • listener: (data: E[T]) => void

    Returns void

  • Add an event listener, returns a function that can be called to remove the listener

    Type Parameters

    • T extends string | number | symbol

    Parameters

    • event: T
    • listener: (data: E[T]) => void

    Returns () => void

  • Add an event listener that will be called only once

    Type Parameters

    • T extends string | number | symbol

    Parameters

    • event: T
    • listener: (data: E[T]) => void

    Returns () => void