Class ShimiEvent<TData, TSource>

The base event class in shimi.

Type Parameters

Hierarchy

Constructors

Accessors

Methods

Constructors

  • Type Parameters

    Type Parameters

    Returns ShimiEvent<TData, TSource>

Accessors

  • get handlers(): ShimiHandler<TData, TSource>[]
  • A collection of handlers which get called in order when the event is triggered.

    Returns ShimiHandler<TData, TSource>[]

Methods

  • Add a new handler to the event.

    Returns

    Returns the added ShimiHandler object.

    Parameters

    • handler: ShimiHandler<TData, TSource> | ((data: TData) => void)

      The new handler, either as a function, or a ShimiHandler object.

    Returns ShimiHandler<TData, TSource>

  • Remove the specified handlers from the event.

    Parameters

    Returns void

  • Runs the collection of handlers that have been added to the event.

    Parameters

    • data: TData

    Returns void

Generated using TypeDoc