Path: blob/main/src/vs/editor/common/services/editorWorkerHost.ts
3295 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { IWebWorkerServer, IWebWorkerClient } from '../../../base/common/worker/webWorker.js';67export abstract class EditorWorkerHost {8public static CHANNEL_NAME = 'editorWorkerHost';9public static getChannel(workerServer: IWebWorkerServer): EditorWorkerHost {10return workerServer.getChannel<EditorWorkerHost>(EditorWorkerHost.CHANNEL_NAME);11}12public static setChannel(workerClient: IWebWorkerClient<any>, obj: EditorWorkerHost): void {13workerClient.setChannel<EditorWorkerHost>(EditorWorkerHost.CHANNEL_NAME, obj);14}1516// foreign host request17abstract $fhr(method: string, args: any[]): Promise<any>;18}192021