diff --git a/baselines/audioworklet.generated.d.ts b/baselines/audioworklet.generated.d.ts index ae1874c12..1d5a8086b 100644 --- a/baselines/audioworklet.generated.d.ts +++ b/baselines/audioworklet.generated.d.ts @@ -678,15 +678,15 @@ declare var MessageEvent: { }; interface MessageEventTargetEventMap { - "message": Event; - "messageerror": Event; + "message": MessageEvent; + "messageerror": MessageEvent; } interface MessageEventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ - onmessage: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessage: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ - onmessageerror: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessageerror: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; addEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index b78862550..bcae88127 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -16385,15 +16385,15 @@ declare var MessageEvent: { }; interface MessageEventTargetEventMap { - "message": Event; - "messageerror": Event; + "message": MessageEvent; + "messageerror": MessageEvent; } interface MessageEventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ - onmessage: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessage: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ - onmessageerror: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessageerror: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; addEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index 13b1cc7d9..f848ec0fd 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -3755,15 +3755,15 @@ declare var MessageEvent: { }; interface MessageEventTargetEventMap { - "message": Event; - "messageerror": Event; + "message": MessageEvent; + "messageerror": MessageEvent; } interface MessageEventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ - onmessage: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessage: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ - onmessageerror: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessageerror: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; addEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index 43efdf8d1..f2bb37e7a 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -3644,15 +3644,15 @@ declare var MessageEvent: { }; interface MessageEventTargetEventMap { - "message": Event; - "messageerror": Event; + "message": MessageEvent; + "messageerror": MessageEvent; } interface MessageEventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ - onmessage: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessage: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ - onmessageerror: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessageerror: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; addEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; diff --git a/baselines/ts5.5/audioworklet.generated.d.ts b/baselines/ts5.5/audioworklet.generated.d.ts index ae1874c12..1d5a8086b 100644 --- a/baselines/ts5.5/audioworklet.generated.d.ts +++ b/baselines/ts5.5/audioworklet.generated.d.ts @@ -678,15 +678,15 @@ declare var MessageEvent: { }; interface MessageEventTargetEventMap { - "message": Event; - "messageerror": Event; + "message": MessageEvent; + "messageerror": MessageEvent; } interface MessageEventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ - onmessage: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessage: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ - onmessageerror: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessageerror: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; addEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index 1a543ef33..d6a806977 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -16365,15 +16365,15 @@ declare var MessageEvent: { }; interface MessageEventTargetEventMap { - "message": Event; - "messageerror": Event; + "message": MessageEvent; + "messageerror": MessageEvent; } interface MessageEventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ - onmessage: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessage: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ - onmessageerror: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessageerror: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; addEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; diff --git a/baselines/ts5.5/serviceworker.generated.d.ts b/baselines/ts5.5/serviceworker.generated.d.ts index 13b1cc7d9..f848ec0fd 100644 --- a/baselines/ts5.5/serviceworker.generated.d.ts +++ b/baselines/ts5.5/serviceworker.generated.d.ts @@ -3755,15 +3755,15 @@ declare var MessageEvent: { }; interface MessageEventTargetEventMap { - "message": Event; - "messageerror": Event; + "message": MessageEvent; + "messageerror": MessageEvent; } interface MessageEventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ - onmessage: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessage: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ - onmessageerror: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessageerror: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; addEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; diff --git a/baselines/ts5.5/sharedworker.generated.d.ts b/baselines/ts5.5/sharedworker.generated.d.ts index 43efdf8d1..f2bb37e7a 100644 --- a/baselines/ts5.5/sharedworker.generated.d.ts +++ b/baselines/ts5.5/sharedworker.generated.d.ts @@ -3644,15 +3644,15 @@ declare var MessageEvent: { }; interface MessageEventTargetEventMap { - "message": Event; - "messageerror": Event; + "message": MessageEvent; + "messageerror": MessageEvent; } interface MessageEventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ - onmessage: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessage: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ - onmessageerror: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessageerror: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; addEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; diff --git a/baselines/ts5.5/webworker.generated.d.ts b/baselines/ts5.5/webworker.generated.d.ts index 0edb041dc..37c8fd5ca 100644 --- a/baselines/ts5.5/webworker.generated.d.ts +++ b/baselines/ts5.5/webworker.generated.d.ts @@ -4329,15 +4329,15 @@ declare var MessageEvent: { }; interface MessageEventTargetEventMap { - "message": Event; - "messageerror": Event; + "message": MessageEvent; + "messageerror": MessageEvent; } interface MessageEventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ - onmessage: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessage: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ - onmessageerror: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessageerror: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; addEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -9732,9 +9732,9 @@ declare function cancelAnimationFrame(handle: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame) */ declare function requestAnimationFrame(callback: FrameRequestCallback): number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ -declare var onmessage: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null; +declare var onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ -declare var onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null; +declare var onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; declare function addEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; declare function removeEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 0edb041dc..37c8fd5ca 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -4329,15 +4329,15 @@ declare var MessageEvent: { }; interface MessageEventTargetEventMap { - "message": Event; - "messageerror": Event; + "message": MessageEvent; + "messageerror": MessageEvent; } interface MessageEventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ - onmessage: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessage: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ - onmessageerror: ((this: MessageEventTarget, ev: Event) => any) | null; + onmessageerror: ((this: MessageEventTarget, ev: MessageEvent) => any) | null; addEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: MessageEventTarget, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -9732,9 +9732,9 @@ declare function cancelAnimationFrame(handle: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame) */ declare function requestAnimationFrame(callback: FrameRequestCallback): number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ -declare var onmessage: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null; +declare var onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ -declare var onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null; +declare var onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; declare function addEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; declare function removeEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index ccd85731b..35d52d3dc 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -1,6 +1,20 @@ { "mixins": { "mixin": { + "MessageEventTarget": { + "events": { + "event": [ + { + "name": "message", + "type": "MessageEvent" + }, + { + "name": "messageerror", + "type": "MessageEvent" + } + ] + } + }, "ChildNode": { "extends": "Node" },