lukeautry / tsoa

Build OpenAPI-compliant REST APIs using TypeScript and Node
MIT License
3.49k stars 499 forks source link

Are tsoa decorators a build-time only feature? #1707

Open trusktr opened 4 hours ago

trusktr commented 4 hours ago

From looking at the source, I see decorators simply return () => {}, which I think implies that they are used only during a compile step (no runtime implementation).

Do you have any thoughts on the new decorator format, in particular the problems and solution I described here?:

discrepancy: we're allowed to get/set private fields, but not public fields, and public auto accessors are not fields.

I'm trying to get all the feedback I can there. It seems not enough people who actually use decorators are involved in the iscussions there.

Maybe decorators for your case are only significant as compiler annotations, which would still be interesting to hear about. If you do have runtime use cases, that would be great to learn about too.

github-actions[bot] commented 4 hours ago

Hello there trusktr 👋

Thank you for opening your very first issue in this project.

We will try to get back to you as soon as we can.👀