@@ -134,7 +134,7 @@ Next, we need to implement the service. To define a handler that fulfills this d
134
134
@Controller ()
135
135
export class HeroesController {
136
136
@GrpcMethod (' HeroesService' , ' FindOne' )
137
- findOne(data : HeroById , metadata : Metadata , call : ServerUnaryCall <any >): Hero {
137
+ findOne(data : HeroById , metadata : Metadata , call : ServerUnaryCall <any , any >): Hero {
138
138
const items = [
139
139
{ id: 1 , name: ' John' },
140
140
{ id: 2 , name: ' Doe' },
@@ -170,7 +170,7 @@ Both `@GrpcMethod()` decorator arguments are optional. If called without the sec
170
170
@Controller ()
171
171
export class HeroesController {
172
172
@GrpcMethod (' HeroesService' )
173
- findOne(data : HeroById , metadata : Metadata , call : ServerUnaryCall <any >): Hero {
173
+ findOne(data : HeroById , metadata : Metadata , call : ServerUnaryCall <any , any >): Hero {
174
174
const items = [
175
175
{ id: 1 , name: ' John' },
176
176
{ id: 2 , name: ' Doe' },
@@ -199,7 +199,7 @@ You can also omit the first `@GrpcMethod()` argument. In this case, Nest automat
199
199
@Controller ()
200
200
export class HeroesService {
201
201
@GrpcMethod ()
202
- findOne(data : HeroById , metadata : Metadata , call : ServerUnaryCall <any >): Hero {
202
+ findOne(data : HeroById , metadata : Metadata , call : ServerUnaryCall <any , any >): Hero {
203
203
const items = [
204
204
{ id: 1 , name: ' John' },
205
205
{ id: 2 , name: ' Doe' },
@@ -493,7 +493,7 @@ To send back metadata from the handler, use the `ServerUnaryCall#sendMetadata()`
493
493
@Controller ()
494
494
export class HeroesService {
495
495
@GrpcMethod ()
496
- findOne(data : HeroById , metadata : Metadata , call : ServerUnaryCall <any >): Hero {
496
+ findOne(data : HeroById , metadata : Metadata , call : ServerUnaryCall <any , any >): Hero {
497
497
const serverMetadata = new Metadata ();
498
498
const items = [
499
499
{ id: 1 , name: ' John' },
0 commit comments