Skip to content

Commit f6d8f13

Browse files
committed
fix(make-client): set provided serviceName to generated class
1 parent f263b09 commit f6d8f13

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)