Closed Shawn211 closed 2 months ago
Thank you for taking the time to submit your report! From the looks of it, this could be better discussed on our Discord. If you haven't already, please join here and send a new post in the # 🐈 nestjs-help forum. Make sure to include a link to this issue, so you don't need to write it all again. We have a large community of helpful members, who will assist you in getting this to work.
Is there an existing issue for this?
Current behavior
After I generated a basic gateway using the scaffold and started using it, the value returned was not transmitted to the client. Upon debugging, I noticed that the final emit did not include the event specified by the decorator, forcing me to specify again which event to return.
after compatibilizing
So I wonder, is it my misuse or misunderstanding of decorators, or is there another default way to use return? Or is it a bug?
Minimum reproduction code
https://stackblitz.com/edit/nestjs-typescript-starter-ssx8xf?file=src%2Fws%2Fws.gateway.ts
Steps to reproduce
Expected behavior
After the @SubscribeMessage decorator specifies the event, I don't have to explicitly indicate the event again with the @WsResponse decorator for the responding return.
Package
Other package
No response
NestJS version
10.3.10
Packages versions
Node.js version
v20.15.0
In which operating systems have you tested?
Other
No response