UNPKG

@tlgr/component

Version:
21 lines (20 loc) 476 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Event = void 0; /** * Custom event. * * Event should provide `name` and `payload`field * * @export * @class Event * @template Payload tuple. E.g. `[string, number, boolean, object]` or named tuple `[text: string, etc.]` * @template Name Event name */ class Event { constructor(name, ...arr) { this.name = name; this.payload = arr; } } exports.Event = Event;