@@ -123,7 +123,7 @@ Next, we need to implement the service. To define a handler that fulfills this d
123
123
@Controller ()
124
124
export class HeroesController {
125
125
@GrpcMethod (' HeroesService' , ' FindOne' )
126
- findOne(data : HeroById , metadata : any , call : any ): Hero {
126
+ findOne(data : HeroById , metadata : Metadata , call : ServerUnaryCall < any > ): Hero {
127
127
const items = [
128
128
{ id: 1 , name: ' John' },
129
129
{ id: 2 , name: ' Doe' },
@@ -160,7 +160,7 @@ Both `@GrpcMethod()` decorator arguments are optional. If called without the sec
160
160
@Controller ()
161
161
export class HeroesController {
162
162
@GrpcMethod (' HeroesService' )
163
- findOne(data : HeroById , metadata : any , call : any ): Hero {
163
+ findOne(data : HeroById , metadata : Metadata , call : ServerUnaryCall < any > ): Hero {
164
164
const items = [
165
165
{ id: 1 , name: ' John' },
166
166
{ id: 2 , name: ' Doe' },
@@ -189,7 +189,7 @@ You can also omit the first `@GrpcMethod()` argument. In this case, Nest automat
189
189
@Controller ()
190
190
export class HeroesService {
191
191
@GrpcMethod ()
192
- findOne(data : HeroById , metadata : any , call : any ): Hero {
192
+ findOne(data : HeroById , metadata : Metadata , call : ServerUnaryCall < any > ): Hero {
193
193
const items = [
194
194
{ id: 1 , name: ' John' },
195
195
{ id: 2 , name: ' Doe' },
@@ -456,7 +456,7 @@ You can send metadata from `@GrpcMethod()` using the function `sendMetadata()` w
456
456
@Controller ()
457
457
export class HeroesService {
458
458
@GrpcMethod ()
459
- findOne(data : HeroById , metadata : any , call : any ): Hero {
459
+ findOne(data : HeroById , metadata : Metadata , call : ServerUnaryCall < any > ): Hero {
460
460
const srvMetadata = new Metadata ();
461
461
const items = [
462
462
{ id: 1 , name: ' John' },
0 commit comments