class Event { constructor(type, data) { this.type = type; this.data = data; } } class DataEvent extends Event { constructor(data) { super("dataavailable", data); } } class ConnectionOpenedEvent extends Event { constructor() { super("connectionopened"); } } class ConnectionClosedEvent extends Event { constructor() { super("connectionclosed"); } } class ConnectionErrorEvent extends Event { constructor() { super("erroroccurred"); } } export {DataEvent, ConnectionOpenedEvent, ConnectionClosedEvent, ConnectionErrorEvent};