sussudio
Version:
An unofficial VS Code Internal API
19 lines (18 loc) • 950 B
text/typescript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Disposable } from "../common/lifecycle.mjs";
export declare class BroadcastDataChannel<T> extends Disposable {
private readonly channelName;
private broadcastChannel;
private readonly _onDidReceiveData;
readonly onDidReceiveData: import("../common/event.mjs").Event<T>;
constructor(channelName: string);
private createBroadcastChannel;
/**
* Sends the data to other BroadcastChannel objects set up for this channel. Data can be structured objects, e.g. nested objects and arrays.
* @param data data to broadcast
*/
postData(data: T): void;
}