Get rid of typed emitter

This commit is contained in:
Jon Staab
2025-04-02 08:54:50 -07:00
parent 1cbcb0ae4a
commit 35f75bb38e
16 changed files with 124 additions and 173 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ import {isRelayUrl} from "@welshman/util"
import {LocalRelay, LOCAL_RELAY_URL} from "@welshman/relay"
import {RelayMessage, ClientMessage} from "./message.js"
import {Socket, SocketEvent} from "./socket.js"
import {TypedEmitter, Unsubscriber} from "./util.js"
import {Unsubscriber} from "./util.js"
import {netContext, NetContext} from "./context.js"
export enum AdapterEvent {
@@ -15,7 +15,7 @@ export type AdapterEvents = {
[AdapterEvent.Receive]: (message: RelayMessage, url: string) => void
}
export abstract class AbstractAdapter extends (EventEmitter as new () => TypedEmitter<AdapterEvents>) {
export abstract class AbstractAdapter extends EventEmitter {
_unsubscribers: Unsubscriber[] = []
abstract urls: string[]