sussudio
Version:
An unofficial VS Code Internal API
22 lines (21 loc) • 816 B
JavaScript
/*---------------------------------------------------------------------------------------------
* 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);
}
}