mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-10-14 22:08:32 +00:00

Hide the concrete implementation behind an interface so that tests can `require` it. Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
15 lines
665 B
TypeScript
15 lines
665 B
TypeScript
import type { Event } from '@theia/core/lib/common/event';
|
|
|
|
/*
|
|
This implementation hides the default HostedPluginSupport implementation from Theia to be able to test it.
|
|
Otherwise, the default implementation fails at require time due to the `import.meta` in the Theia plugin worker code.
|
|
https://github.com/eclipse-theia/theia/blob/964f69ca3b3a5fb87ffa0177fb300b74ba0ca39f/packages/plugin-ext/src/hosted/browser/plugin-worker.ts#L30-L32
|
|
*/
|
|
|
|
export const HostedPluginSupport = Symbol('HostedPluginSupport');
|
|
export interface HostedPluginSupport {
|
|
readonly didStart: Promise<void>;
|
|
readonly onDidLoad: Event<void>;
|
|
readonly onDidCloseConnection: Event<void>;
|
|
}
|