Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions types/node/test/worker_threads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>
};
bc.onmessageerror = (msg) => {
msg; // $ExpectType MessageEvent<any>
};

// Test global alias
const bc2 = new BroadcastChannel("test");
Expand Down
8 changes: 6 additions & 2 deletions types/node/v18/test/worker_threads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>
};
bc.onmessageerror = (msg) => {
msg; // $ExpectType MessageEvent<any>
};

// Test global alias
const bc2 = new BroadcastChannel("test");
Expand Down
7 changes: 4 additions & 3 deletions types/node/v18/worker_threads.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down
8 changes: 6 additions & 2 deletions types/node/v20/test/worker_threads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>
};
bc.onmessageerror = (msg) => {
msg; // $ExpectType MessageEvent<any>
};

// Test global alias
const bc2 = new BroadcastChannel("test");
Expand Down
7 changes: 4 additions & 3 deletions types/node/v20/worker_threads.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down
8 changes: 6 additions & 2 deletions types/node/v22/test/worker_threads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>
};
bc.onmessageerror = (msg) => {
msg; // $ExpectType MessageEvent<any>
};

// Test global alias
const bc2 = new BroadcastChannel("test");
Expand Down
7 changes: 4 additions & 3 deletions types/node/v22/worker_threads.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down
7 changes: 4 additions & 3 deletions types/node/worker_threads.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down
18 changes: 0 additions & 18 deletions types/office-js-preview/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions types/office-js/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down