4
4
* @public
5
5
*/
6
6
7
- // GENERATED CODE -- DO NOT EDIT!
7
+ // Code generated by protoc-gen-grpc-web. DO NOT EDIT.
8
+ // versions:
9
+ // protoc-gen-grpc-web v1.5.0
10
+ // protoc v6.31.1
11
+ // source: greet.proto
12
+
13
+
14
+ /* eslint-disable */
15
+ // @ts -nocheck
8
16
9
17
10
18
@@ -17,15 +25,15 @@ proto.greet = require('./greet_pb.js');
17
25
/**
18
26
* @param {string } hostname
19
27
* @param {?Object } credentials
20
- * @param {?Object } options
28
+ * @param {?grpc.web.ClientOptions } options
21
29
* @constructor
22
30
* @struct
23
31
* @final
24
32
*/
25
33
proto . greet . GreeterClient =
26
34
function ( hostname , credentials , options ) {
27
35
if ( ! options ) options = { } ;
28
- options [ ' format' ] = 'text' ;
36
+ options . format = 'text' ;
29
37
30
38
/**
31
39
* @private @const {!grpc.web.GrpcWebClientBase} The client
@@ -35,23 +43,23 @@ proto.greet.GreeterClient =
35
43
/**
36
44
* @private @const {string} The hostname
37
45
*/
38
- this . hostname_ = hostname ;
46
+ this . hostname_ = hostname . replace ( / \/ + $ / , '' ) ;
39
47
40
48
} ;
41
49
42
50
43
51
/**
44
52
* @param {string } hostname
45
53
* @param {?Object } credentials
46
- * @param {?Object } options
54
+ * @param {?grpc.web.ClientOptions } options
47
55
* @constructor
48
56
* @struct
49
57
* @final
50
58
*/
51
59
proto . greet . GreeterPromiseClient =
52
60
function ( hostname , credentials , options ) {
53
61
if ( ! options ) options = { } ;
54
- options [ ' format' ] = 'text' ;
62
+ options . format = 'text' ;
55
63
56
64
/**
57
65
* @private @const {!grpc.web.GrpcWebClientBase} The client
@@ -61,7 +69,7 @@ proto.greet.GreeterPromiseClient =
61
69
/**
62
70
* @private @const {string} The hostname
63
71
*/
64
- this . hostname_ = hostname ;
72
+ this . hostname_ = hostname . replace ( / \/ + $ / , '' ) ;
65
73
66
74
} ;
67
75
@@ -88,31 +96,12 @@ const methodDescriptor_Greeter_SayHello = new grpc.web.MethodDescriptor(
88
96
) ;
89
97
90
98
91
- /**
92
- * @const
93
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
94
- * !proto.greet.HelloRequest,
95
- * !proto.greet.HelloReply>}
96
- */
97
- const methodInfo_Greeter_SayHello = new grpc . web . AbstractClientBase . MethodInfo (
98
- proto . greet . HelloReply ,
99
- /**
100
- * @param {!proto.greet.HelloRequest } request
101
- * @return {!Uint8Array }
102
- */
103
- function ( request ) {
104
- return request . serializeBinary ( ) ;
105
- } ,
106
- proto . greet . HelloReply . deserializeBinary
107
- ) ;
108
-
109
-
110
99
/**
111
100
* @param {!proto.greet.HelloRequest } request The
112
101
* request proto
113
102
* @param {?Object<string, string> } metadata User defined
114
103
* call metadata
115
- * @param {function(?grpc.web.Error , ?proto.greet.HelloReply) }
104
+ * @param {function(?grpc.web.RpcError , ?proto.greet.HelloReply) }
116
105
* callback The callback function(error, response)
117
106
* @return {!grpc.web.ClientReadableStream<!proto.greet.HelloReply>|undefined }
118
107
* The XHR Node Readable Stream
@@ -131,10 +120,10 @@ proto.greet.GreeterClient.prototype.sayHello =
131
120
/**
132
121
* @param {!proto.greet.HelloRequest } request The
133
122
* request proto
134
- * @param {?Object<string, string> } metadata User defined
123
+ * @param {?Object<string, string>= } metadata User defined
135
124
* call metadata
136
125
* @return {!Promise<!proto.greet.HelloReply> }
137
- * A native promise that resolves to the response
126
+ * Promise that resolves to the response
138
127
*/
139
128
proto . greet . GreeterPromiseClient . prototype . sayHello =
140
129
function ( request , metadata ) {
@@ -168,28 +157,9 @@ const methodDescriptor_Greeter_SayHellos = new grpc.web.MethodDescriptor(
168
157
) ;
169
158
170
159
171
- /**
172
- * @const
173
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
174
- * !proto.greet.HelloRequest,
175
- * !proto.greet.HelloReply>}
176
- */
177
- const methodInfo_Greeter_SayHellos = new grpc . web . AbstractClientBase . MethodInfo (
178
- proto . greet . HelloReply ,
179
- /**
180
- * @param {!proto.greet.HelloRequest } request
181
- * @return {!Uint8Array }
182
- */
183
- function ( request ) {
184
- return request . serializeBinary ( ) ;
185
- } ,
186
- proto . greet . HelloReply . deserializeBinary
187
- ) ;
188
-
189
-
190
160
/**
191
161
* @param {!proto.greet.HelloRequest } request The request proto
192
- * @param {?Object<string, string> } metadata User defined
162
+ * @param {?Object<string, string>= } metadata User defined
193
163
* call metadata
194
164
* @return {!grpc.web.ClientReadableStream<!proto.greet.HelloReply> }
195
165
* The XHR Node Readable Stream
@@ -206,7 +176,7 @@ proto.greet.GreeterClient.prototype.sayHellos =
206
176
207
177
/**
208
178
* @param {!proto.greet.HelloRequest } request The request proto
209
- * @param {?Object<string, string> } metadata User defined
179
+ * @param {?Object<string, string>= } metadata User defined
210
180
* call metadata
211
181
* @return {!grpc.web.ClientReadableStream<!proto.greet.HelloReply> }
212
182
* The XHR Node Readable Stream
0 commit comments