mirror of https://github.com/grpc/grpc-node.git
Merge pull request #1993 from DavyJohnes/fix-class-options-issue
grpc-js: Set provided class options to generated class
This commit is contained in:
commit
6a5b52182f
|
@ -91,6 +91,7 @@ export interface ServiceClientConstructor {
|
||||||
options?: Partial<ChannelOptions>
|
options?: Partial<ChannelOptions>
|
||||||
): ServiceClient;
|
): ServiceClient;
|
||||||
service: ServiceDefinition;
|
service: ServiceDefinition;
|
||||||
|
serviceName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -127,6 +128,7 @@ export function makeClientConstructor(
|
||||||
|
|
||||||
class ServiceClientImpl extends Client implements ServiceClient {
|
class ServiceClientImpl extends Client implements ServiceClient {
|
||||||
static service: ServiceDefinition;
|
static service: ServiceDefinition;
|
||||||
|
static serviceName: string;
|
||||||
[methodName: string]: Function;
|
[methodName: string]: Function;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,6 +173,7 @@ export function makeClientConstructor(
|
||||||
});
|
});
|
||||||
|
|
||||||
ServiceClientImpl.service = methods;
|
ServiceClientImpl.service = methods;
|
||||||
|
ServiceClientImpl.serviceName = serviceName;
|
||||||
|
|
||||||
return ServiceClientImpl;
|
return ServiceClientImpl;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue