diff --git a/packages/interface/src/event-target.ts b/packages/interface/src/event-target.ts index f09d127ef4..de967c61ff 100644 --- a/packages/interface/src/event-target.ts +++ b/packages/interface/src/event-target.ts @@ -105,22 +105,4 @@ export class TypedEventEmitter> extends Eve } } -/** - * CustomEvent is a standard event but it's not supported by node. - * - * Remove this when https://github.com/nodejs/node/issues/40678 is closed. - * - * Ref: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent - */ -class CustomEventPolyfill extends Event { - /** Returns any custom data event was created with. Typically used for synthetic events. */ - public detail: T - - constructor (message: string, data?: EventInit & { detail: T }) { - super(message, data) - // @ts-expect-error could be undefined - this.detail = data?.detail - } -} - -export const CustomEvent = globalThis.CustomEvent ?? CustomEventPolyfill +export const CustomEvent = globalThis.CustomEvent