diff --git a/types/node/test/worker_threads.ts b/types/node/test/worker_threads.ts index 94cf1df5202094e..60982438f7b5260 100644 --- a/types/node/test/worker_threads.ts +++ b/types/node/test/worker_threads.ts @@ -144,8 +144,12 @@ import { createContext } from "node:vm"; bc.close(); bc.ref(); bc.unref(); - bc.onmessage = (msg: unknown) => {}; - bc.onmessageerror = (msg: unknown) => {}; + bc.onmessage = (msg) => { + msg; // $ExpectType MessageEvent + }; + bc.onmessageerror = (msg) => { + msg; // $ExpectType MessageEvent + }; // Test global alias const bc2 = new BroadcastChannel("test"); diff --git a/types/node/v18/test/worker_threads.ts b/types/node/v18/test/worker_threads.ts index 31d2b08702443b8..11a3c35e81d5242 100644 --- a/types/node/v18/test/worker_threads.ts +++ b/types/node/v18/test/worker_threads.ts @@ -128,8 +128,12 @@ import { createContext } from "node:vm"; bc.close(); bc.ref(); bc.unref(); - bc.onmessage = (msg: unknown) => {}; - bc.onmessageerror = (msg: unknown) => {}; + bc.onmessage = (msg) => { + msg; // $ExpectType MessageEvent + }; + bc.onmessageerror = (msg) => { + msg; // $ExpectType MessageEvent + }; // Test global alias const bc2 = new BroadcastChannel("test"); diff --git a/types/node/v18/worker_threads.d.ts b/types/node/v18/worker_threads.d.ts index 484f457fb6fc723..de5244216cacb21 100644 --- a/types/node/v18/worker_threads.d.ts +++ b/types/node/v18/worker_threads.d.ts @@ -59,6 +59,7 @@ declare module "worker_threads" { import { Readable, Writable } from "node:stream"; import { ReadableStream, TransformStream, WritableStream } from "node:stream/web"; import { URL } from "node:url"; + import { MessageEvent } from "undici-types"; const isMainThread: boolean; const parentPort: null | MessagePort; const resourceLimits: ResourceLimits; @@ -525,18 +526,18 @@ declare module "worker_threads" { * ``` * @since v15.4.0 */ - class BroadcastChannel { + class BroadcastChannel extends EventTarget { readonly name: string; /** * Invoked with a single \`MessageEvent\` argument when a message is received. * @since v15.4.0 */ - onmessage: (message: unknown) => void; + onmessage: (message: MessageEvent) => void; /** * Invoked with a received message cannot be deserialized. * @since v15.4.0 */ - onmessageerror: (message: unknown) => void; + onmessageerror: (message: MessageEvent) => void; constructor(name: string); /** * Closes the `BroadcastChannel` connection. diff --git a/types/node/v20/test/worker_threads.ts b/types/node/v20/test/worker_threads.ts index aeaac9f9e56293a..9e67d8baf97cbd1 100644 --- a/types/node/v20/test/worker_threads.ts +++ b/types/node/v20/test/worker_threads.ts @@ -128,8 +128,12 @@ import { createContext } from "node:vm"; bc.close(); bc.ref(); bc.unref(); - bc.onmessage = (msg: unknown) => {}; - bc.onmessageerror = (msg: unknown) => {}; + bc.onmessage = (msg) => { + msg; // $ExpectType MessageEvent + }; + bc.onmessageerror = (msg) => { + msg; // $ExpectType MessageEvent + }; // Test global alias const bc2 = new BroadcastChannel("test"); diff --git a/types/node/v20/worker_threads.d.ts b/types/node/v20/worker_threads.d.ts index 89603a84c9166b9..a580d08243a90f2 100644 --- a/types/node/v20/worker_threads.d.ts +++ b/types/node/v20/worker_threads.d.ts @@ -59,6 +59,7 @@ declare module "worker_threads" { import { Readable, Writable } from "node:stream"; import { ReadableStream, TransformStream, WritableStream } from "node:stream/web"; import { URL } from "node:url"; + import { MessageEvent } from "undici-types"; const isMainThread: boolean; const parentPort: null | MessagePort; const resourceLimits: ResourceLimits; @@ -544,18 +545,18 @@ declare module "worker_threads" { * ``` * @since v15.4.0 */ - class BroadcastChannel { + class BroadcastChannel extends EventTarget { readonly name: string; /** * Invoked with a single \`MessageEvent\` argument when a message is received. * @since v15.4.0 */ - onmessage: (message: unknown) => void; + onmessage: (message: MessageEvent) => void; /** * Invoked with a received message cannot be deserialized. * @since v15.4.0 */ - onmessageerror: (message: unknown) => void; + onmessageerror: (message: MessageEvent) => void; constructor(name: string); /** * Closes the `BroadcastChannel` connection. diff --git a/types/node/v22/test/worker_threads.ts b/types/node/v22/test/worker_threads.ts index 38c7648f246e01f..b666a7465ab4f40 100644 --- a/types/node/v22/test/worker_threads.ts +++ b/types/node/v22/test/worker_threads.ts @@ -144,8 +144,12 @@ import { createContext } from "node:vm"; bc.close(); bc.ref(); bc.unref(); - bc.onmessage = (msg: unknown) => {}; - bc.onmessageerror = (msg: unknown) => {}; + bc.onmessage = (msg) => { + msg; // $ExpectType MessageEvent + }; + bc.onmessageerror = (msg) => { + msg; // $ExpectType MessageEvent + }; // Test global alias const bc2 = new BroadcastChannel("test"); diff --git a/types/node/v22/worker_threads.d.ts b/types/node/v22/worker_threads.d.ts index d48fbabf4d3c53e..75f64ce2a9cd26a 100644 --- a/types/node/v22/worker_threads.d.ts +++ b/types/node/v22/worker_threads.d.ts @@ -63,6 +63,7 @@ declare module "worker_threads" { import { ReadableStream, TransformStream, WritableStream } from "node:stream/web"; import { URL } from "node:url"; import { HeapInfo } from "node:v8"; + import { MessageEvent } from "undici-types"; const isInternalThread: boolean; const isMainThread: boolean; const parentPort: null | MessagePort; @@ -573,18 +574,18 @@ declare module "worker_threads" { * ``` * @since v15.4.0 */ - class BroadcastChannel { + class BroadcastChannel extends EventTarget { readonly name: string; /** * Invoked with a single \`MessageEvent\` argument when a message is received. * @since v15.4.0 */ - onmessage: (message: unknown) => void; + onmessage: (message: MessageEvent) => void; /** * Invoked with a received message cannot be deserialized. * @since v15.4.0 */ - onmessageerror: (message: unknown) => void; + onmessageerror: (message: MessageEvent) => void; constructor(name: string); /** * Closes the `BroadcastChannel` connection. diff --git a/types/node/worker_threads.d.ts b/types/node/worker_threads.d.ts index c0acdefb81da433..73446b174cb23c9 100644 --- a/types/node/worker_threads.d.ts +++ b/types/node/worker_threads.d.ts @@ -63,6 +63,7 @@ declare module "worker_threads" { import { ReadableStream, TransformStream, WritableStream } from "node:stream/web"; import { URL } from "node:url"; import { HeapInfo } from "node:v8"; + import { MessageEvent } from "undici-types"; const isInternalThread: boolean; const isMainThread: boolean; const parentPort: null | MessagePort; @@ -574,18 +575,18 @@ declare module "worker_threads" { * ``` * @since v15.4.0 */ - class BroadcastChannel { + class BroadcastChannel extends EventTarget { readonly name: string; /** * Invoked with a single \`MessageEvent\` argument when a message is received. * @since v15.4.0 */ - onmessage: (message: unknown) => void; + onmessage: (message: MessageEvent) => void; /** * Invoked with a received message cannot be deserialized. * @since v15.4.0 */ - onmessageerror: (message: unknown) => void; + onmessageerror: (message: MessageEvent) => void; constructor(name: string); /** * Closes the `BroadcastChannel` connection. diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 540e3c45a6cbbdb..9a009605579bfa5 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -55823,9 +55823,6 @@ declare namespace Excel { * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. - * - * @remarks - * [Api set: ExcelApi 1.20] */ load(propertyNamesAndPaths?: { select?: string; @@ -55935,9 +55932,6 @@ declare namespace Excel { * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. - * - * @remarks - * [Api set: ExcelApi 1.20] */ load(propertyNamesAndPaths?: { select?: string; @@ -56024,9 +56018,6 @@ declare namespace Excel { * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. - * - * @remarks - * [Api set: ExcelApi 1.20] */ load(propertyNamesAndPaths?: { select?: string; @@ -56085,9 +56076,6 @@ declare namespace Excel { * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. - * - * @remarks - * [Api set: ExcelApi 1.20] */ load(propertyNamesAndPaths?: { select?: string; @@ -56153,9 +56141,6 @@ declare namespace Excel { * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. - * - * @remarks - * [Api set: ExcelApi 1.20] */ load(propertyNamesAndPaths?: { select?: string; @@ -56292,9 +56277,6 @@ declare namespace Excel { * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. - * - * @remarks - * [Api set: ExcelApi 1.20] */ load(propertyNamesAndPaths?: { select?: string; diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 6aeb8217d81162e..98d8f3fbd8c6ee5 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -51834,9 +51834,6 @@ declare namespace Excel { * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. - * - * @remarks - * [Api set: ExcelApi 1.20] */ load(propertyNamesAndPaths?: { select?: string;