@ouroboros/events
Version:
Package to give the ability to subscribe to and trigger synchronous events in javascript. Useful for passing data around a project without creating import conflicts.
33 lines (32 loc) • 677 B
TypeScript
/**
* Events
*
* Event model for non UI events
*
* @author Chris Nasr <chris@ouroboroscoding.com>
* @copyright Ouroboros Coding Inc.
* @created 2018-11-24
*/
import Event from './Event';
/**
* Events
*
* Handles managing individual events, created once and exported
*
* @name Events
* @access private
*/
export default class Events {
events: Record<string, Event>;
/**
* Get
*
* Returns the event object associated with the requested string. If one
* does not exist yet, it is created then returned
*
* @name get
* @access public
* @param event The name of the event to get
*/
get(name: string): Event;
}