diff --git a/packages/interface/src/events.ts b/packages/interface/src/events.ts index 4c4a498fc3..e7fb860983 100644 --- a/packages/interface/src/events.ts +++ b/packages/interface/src/events.ts @@ -117,9 +117,6 @@ class CustomEventPolyfill extends Event { export const CustomEvent = globalThis.CustomEvent ?? CustomEventPolyfill -// TODO: remove this in v1 -export { TypedEventEmitter as EventEmitter } - // create a setMaxListeners that doesn't break browser usage export const setMaxListeners: typeof nodeSetMaxListeners = (n, ...eventTargets) => { try { diff --git a/packages/peer-discovery-mdns/src/mdns.ts b/packages/peer-discovery-mdns/src/mdns.ts index 4cfc1a4dea..6c748d5657 100644 --- a/packages/peer-discovery-mdns/src/mdns.ts +++ b/packages/peer-discovery-mdns/src/mdns.ts @@ -1,4 +1,4 @@ -import { CustomEvent, EventEmitter } from '@libp2p/interface/events' +import { CustomEvent, TypedEventEmitter } from '@libp2p/interface/events' import { peerDiscovery } from '@libp2p/interface/peer-discovery' import multicastDNS from 'multicast-dns' import * as query from './query.js' @@ -23,7 +23,7 @@ export interface MulticastDNSComponents { logger: ComponentLogger } -export class MulticastDNS extends EventEmitter implements PeerDiscovery, Startable { +export class MulticastDNS extends TypedEventEmitter implements PeerDiscovery, Startable { public mdns?: multicastDNS.MulticastDNS private readonly log: Logger