fix(make-client): set provided serviceName to generated class

This commit is contained in:
DavyJohnes 2022-01-10 13:54:53 +03:00
parent f263b091b4
commit f6d8f137a2
1 changed files with 3 additions and 0 deletions

View File

@ -91,6 +91,7 @@ export interface ServiceClientConstructor {
options?: Partial<ChannelOptions>
): ServiceClient;
service: ServiceDefinition;
serviceName: string;
}
/**
@ -127,6 +128,7 @@ export function makeClientConstructor(
class ServiceClientImpl extends Client implements ServiceClient {
static service: ServiceDefinition;
static serviceName: string;
[methodName: string]: Function;
}
@ -171,6 +173,7 @@ export function makeClientConstructor(
});
ServiceClientImpl.service = methods;
ServiceClientImpl.serviceName = serviceName;
return ServiceClientImpl;
}