Skip to content

Commit

Permalink
Merge pull request #62 from RMHonor/master
Browse files Browse the repository at this point in the history
Add ClientOptions in constructor for grpc-js clients
  • Loading branch information
agreatfool authored Jul 31, 2020
2 parents abbf10a + 3e1eb1f commit e2191cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/template/svc_tsd.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ export interface I{{{serviceName}}}Client {
}

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

0 comments on commit e2191cf

Please sign in to comment.