I am trying to use fat arrow function with a nestjs decorator in a controller.
So is it possible to do something like this :
@Controller()
export class AppController {
@Get()
findAll = (): string => 'This is coming from a fat arrow !';
}
With this code typescript is telling me this : Unable to resolve signature of property decorator when called as an expression
so it isn't working.
I prefer to use fat arrow function instead of this "traditional" function :
@Controller()
export class AppController {
@Get()
findAll(): string {
return 'This is not comming from a fat arrow';
}
}
This is why I am asking if something like this a possible.