UNPKG

sussudio

Version:

An unofficial VS Code Internal API

19 lines (18 loc) 1.06 kB
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { IChannel, IServerChannel, StaticRouter } from "../../../base/parts/ipc/common/ipc.mjs"; import { Server as MessagePortServer } from "../../../base/parts/ipc/electron-browser/ipc.mp.mjs"; import { IMainProcessService } from "../electron-sandbox/services.mjs"; /** * An implementation of `IMainProcessService` that leverages MessagePorts. */ export declare class MessagePortMainProcessService implements IMainProcessService { private server; private router; readonly _serviceBrand: undefined; constructor(server: MessagePortServer, router: StaticRouter); getChannel(channelName: string): IChannel; registerChannel(channelName: string, channel: IServerChannel<string>): void; }