Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
trusktr opened this issue Oct 17, 2024 · 2 comments
Open

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

trusktr opened this issue Oct 17, 2024 · 2 comments

Comments

@trusktr
Copy link

trusktr commented Oct 17, 2024

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.

Copy link

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.👀

@WoH
Copy link
Collaborator

WoH commented Oct 18, 2024

Most of them are, and that can't change until types are available at runtime (which may likely be never).

I.e. @Middlewares is not just compile time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants