@sussudio/platform
Version:
Internal APIs for VS Code's service injection the base services.
20 lines (18 loc) • 1.05 kB
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 { IChannel, IServerChannel, StaticRouter } from '@sussudio/base/parts/ipc/common/ipc.mjs';
import { Server as MessagePortServer } from '@sussudio/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;
}