More strict function fixes

For #81574
This commit is contained in:
Matt Bierner
2020-02-11 09:29:22 -08:00
parent efb781e5be
commit 7a1ab29427
5 changed files with 20 additions and 12 deletions

View File

@@ -14,12 +14,12 @@ export type IExtHostCustomerCtor<T extends IDisposable> = IConstructorSignature1
export function extHostNamedCustomer<T extends IDisposable>(id: ProxyIdentifier<T>) {
return function <Services extends BrandedService[]>(ctor: { new(context: IExtHostContext, ...services: Services): T }): void {
ExtHostCustomersRegistryImpl.INSTANCE.registerNamedCustomer(id, ctor);
ExtHostCustomersRegistryImpl.INSTANCE.registerNamedCustomer(id, ctor as IExtHostCustomerCtor<T>);
};
}
export function extHostCustomer<T extends IDisposable, Services extends BrandedService[]>(ctor: { new(context: IExtHostContext, ...services: Services): T }): void {
ExtHostCustomersRegistryImpl.INSTANCE.registerCustomer(ctor);
ExtHostCustomersRegistryImpl.INSTANCE.registerCustomer(ctor as IExtHostCustomerCtor<T>);
}
export namespace ExtHostCustomersRegistry {