export class TypedEventTarget{_bus=new EventTarget;listen(e){function wrappedListener(s){e(s.data)}return this._bus.addEventListener("message",wrappedListener),()=>this._bus.removeEventListener("message",wrappedListener)}fireEvent(e){this._bus.dispatchEvent(new MessageEvent("message",{data:e}))}}