Skip to content

Commit 6a5b521

Browse files
authored
Merge pull request #1993 from DavyJohnes/fix-class-options-issue
grpc-js: Set provided class options to generated class
2 parents 81ef5e3 + f6d8f13 commit 6a5b521

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/grpc-js/src/make-client.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ export interface ServiceClientConstructor {
9191
options?: Partial<ChannelOptions>
9292
): ServiceClient;
9393
service: ServiceDefinition;
94+
serviceName: string;
9495
}
9596

9697
/**
@@ -127,6 +128,7 @@ export function makeClientConstructor(
127128

128129
class ServiceClientImpl extends Client implements ServiceClient {
129130
static service: ServiceDefinition;
131+
static serviceName: string;
130132
[methodName: string]: Function;
131133
}
132134

@@ -171,6 +173,7 @@ export function makeClientConstructor(
171173
});
172174

173175
ServiceClientImpl.service = methods;
176+
ServiceClientImpl.serviceName = serviceName;
174177

175178
return ServiceClientImpl;
176179
}

0 commit comments

Comments
 (0)