mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
Let IRPCProtocol#getProxy return Proxied<T> which enforces functions returning promises
fyi @sandy081 had to remove the overload of `MainThreadOutputServiceShape#$update` because I couldn't get this to work with mapped types fyi @Tyriar this fixed an actual issue with terminals
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ProxyIdentifier, IRPCProtocol } from 'vs/workbench/services/extensions/common/proxyIdentifier';
|
||||
import { ProxyIdentifier, IRPCProtocol, Proxied } from 'vs/workbench/services/extensions/common/proxyIdentifier';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export const IExtHostRpcService = createDecorator<IExtHostRpcService>('IExtHostRpcService');
|
||||
@@ -15,7 +15,7 @@ export interface IExtHostRpcService extends IRPCProtocol {
|
||||
export class ExtHostRpcService implements IExtHostRpcService {
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
readonly getProxy: <T>(identifier: ProxyIdentifier<T>) => T;
|
||||
readonly getProxy: <T>(identifier: ProxyIdentifier<T>) => Proxied<T>;
|
||||
readonly set: <T, R extends T> (identifier: ProxyIdentifier<T>, instance: R) => R;
|
||||
readonly assertRegistered: (identifiers: ProxyIdentifier<any>[]) => void;
|
||||
readonly drain: () => Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user