Skip to content

Commit e2191cf

Browse files
authored
Merge pull request #62 from RMHonor/master
Add ClientOptions in constructor for grpc-js clients
2 parents abbf10a + 3e1eb1f commit e2191cf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib/template/svc_tsd.hbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ export interface I{{{serviceName}}}Client {
7676
}
7777

7878
export class {{{serviceName}}}Client extends grpc.Client implements I{{{serviceName}}}Client {
79+
{{#if (fetchIsGrpcJs)}}
80+
constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial<grpc.ClientOptions>);
81+
{{else}}
7982
constructor(address: string, credentials: grpc.ChannelCredentials, options?: object);
83+
{{/if}}
8084
{{#each methods}}
8185
{{#eq type "ClientUnaryCall"}}
8286
public {{lcFirst methodName}}(request: {{{requestTypeName}}}, callback: (error: grpc.ServiceError | null, response: {{{responseTypeName}}}) => void): grpc.ClientUnaryCall;

0 commit comments

Comments
 (0)