Skip to content

Commit 5e74ef9

Browse files
committed
debt - let proxy IPC implement interface
1 parent 05999d3 commit 5e74ef9

6 files changed

Lines changed: 11 additions & 6 deletions

File tree

‎src/vs/platform/electron/electron-sandbox/electron.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ export const IElectronService = createDecorator<IElectronService>('electronServi
1212

1313
export interface IElectronService extends ICommonElectronService { }
1414

15-
export class ElectronService {
15+
// @ts-ignore: interface is implemented via proxy
16+
export class ElectronService implements IElectronService {
1617

1718
declare readonly _serviceBrand: undefined;
1819

‎src/vs/workbench/services/issue/electron-sandbox/issueService.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import { IMainProcessService } from 'vs/platform/ipc/electron-sandbox/mainProces
88
import { createChannelSender } from 'vs/base/parts/ipc/common/ipc';
99
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
1010

11-
export class IssueService {
11+
// @ts-ignore: interface is implemented via proxy
12+
export class IssueService implements IIssueService {
1213

1314
declare readonly _serviceBrand: undefined;
1415

‎src/vs/workbench/services/localizations/electron-browser/localizationsService.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import { ILocalizationsService } from 'vs/platform/localizations/common/localiza
88
import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService';
99
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
1010

11-
export class LocalizationsService {
11+
// @ts-ignore: interface is implemented via proxy
12+
export class LocalizationsService implements ILocalizationsService {
1213

1314
declare readonly _serviceBrand: undefined;
1415

‎src/vs/workbench/services/menubar/electron-sandbox/menubarService.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import { IMainProcessService } from 'vs/platform/ipc/electron-sandbox/mainProces
88
import { createChannelSender } from 'vs/base/parts/ipc/common/ipc';
99
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
1010

11-
export class MenubarService {
11+
// @ts-ignore: interface is implemented via proxy
12+
export class MenubarService implements IMenubarService {
1213

1314
declare readonly _serviceBrand: undefined;
1415

‎src/vs/workbench/services/url/electron-sandbox/urlService.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class RelayURLService extends NativeURLService implements IURLHandler, IO
3131
) {
3232
super();
3333

34-
this.urlService = createChannelSender(mainProcessService.getChannel('url'));
34+
this.urlService = createChannelSender<IURLService>(mainProcessService.getChannel('url'));
3535

3636
mainProcessService.registerChannel('urlHandler', new URLHandlerChannel(this));
3737
openerService.registerOpener(this);

‎src/vs/workbench/services/workspaces/electron-sandbox/workspacesService.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
99
import { createChannelSender } from 'vs/base/parts/ipc/common/ipc';
1010
import { IElectronService } from 'vs/platform/electron/electron-sandbox/electron';
1111

12-
export class NativeWorkspacesService {
12+
// @ts-ignore: interface is implemented via proxy
13+
export class NativeWorkspacesService implements IWorkspacesService {
1314

1415
declare readonly _serviceBrand: undefined;
1516

0 commit comments

Comments
 (0)