UNPKG

@sussudio/platform

Version:

Internal APIs for VS Code's service injection the base services.

22 lines (21 loc) 768 B
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ /** * An implementation of `IMainProcessService` that leverages MessagePorts. */ export class MessagePortMainProcessService { server; router; constructor(server, router) { this.server = server; this.router = router; } getChannel(channelName) { return this.server.getChannel(channelName, this.router); } registerChannel(channelName, channel) { this.server.registerChannel(channelName, channel); } }