diff --git a/package.json b/package.json index 5737e0c74eb..e5495deecd3 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "@fastify/busboy": "3.0.0", "@matteo.collina/tspl": "^0.1.1", "@sinonjs/fake-timers": "^11.1.0", - "@types/node": "^18.0.3", + "@types/node": "~18.17.19", "abort-controller": "^3.0.0", "borp": "^0.17.0", "c8": "^10.0.0", diff --git a/types/eventsource.d.ts b/types/eventsource.d.ts index eecda8c0151..deccd730041 100644 --- a/types/eventsource.d.ts +++ b/types/eventsource.d.ts @@ -2,8 +2,6 @@ import { MessageEvent, ErrorEvent } from './websocket' import Dispatcher from './dispatcher' import { - EventTarget, - Event, EventListenerOptions, AddEventListenerOptions, EventListenerOrEventListenerObject diff --git a/types/patch.d.ts b/types/patch.d.ts index e48700f4c6f..8f7acbb069e 100644 --- a/types/patch.d.ts +++ b/types/patch.d.ts @@ -2,48 +2,6 @@ // See https://github.com/nodejs/undici/issues/1740 -export type DOMException = typeof globalThis extends { DOMException: infer T } - ? T - : any - -export type EventTarget = typeof globalThis extends { EventTarget: infer T } - ? T - : { - addEventListener( - type: string, - listener: any, - options?: any, - ): void - dispatchEvent(event: Event): boolean - removeEventListener( - type: string, - listener: any, - options?: any | boolean, - ): void - } - -export type Event = typeof globalThis extends { Event: infer T } - ? T - : { - readonly bubbles: boolean - cancelBubble: () => void - readonly cancelable: boolean - readonly composed: boolean - composedPath(): [EventTarget?] - readonly currentTarget: EventTarget | null - readonly defaultPrevented: boolean - readonly eventPhase: 0 | 2 - readonly isTrusted: boolean - preventDefault(): void - returnValue: boolean - readonly srcElement: EventTarget | null - stopImmediatePropagation(): void - stopPropagation(): void - readonly target: EventTarget | null - readonly timeStamp: number - readonly type: string - } - export interface EventInit { bubbles?: boolean cancelable?: boolean diff --git a/types/websocket.d.ts b/types/websocket.d.ts index a961914eb9f..946cbdc2864 100644 --- a/types/websocket.d.ts +++ b/types/websocket.d.ts @@ -3,8 +3,6 @@ import type { Blob } from 'buffer' import type { MessagePort } from 'worker_threads' import { - EventTarget, - Event, EventInit, EventListenerOptions, AddEventListenerOptions,