Merge pull request #1993 from DavyJohnes/fix-class-options-issue

grpc-js: Set provided class options to generated class
This commit is contained in:
Michael Lumish 2022-01-10 15:49:58 -08:00 committed by GitHub
commit 6a5b52182f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}