-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Figure out what to do with typed decorators #4110
Comments
Would you like to send a PR for restoring the functionality that was added in 2981 and I later removed by mistake? I would prefer to not wait for v5... and also that was slotted in to be released in v4. |
Made #4111 with something that could at least be a starting point |
voxpelli
added a commit
to voxpelli/fastify
that referenced
this issue
Jun 26, 2023
Non-breaking backwards compatible enhancement of decorators. Should not have the issues of fastify#4110 which was reverted in fastify#4129
voxpelli
added a commit
to voxpelli/fastify
that referenced
this issue
Jun 26, 2023
Non-breaking backwards compatible enhancement of decorators. Should not have the issues of fastify#4110 which was reverted in fastify#4129 Signed-off-by: Pelle Wessman <pelle@kodfabrik.se>
mcollina
pushed a commit
that referenced
this issue
Jun 30, 2023
* feat: have `decorate()` etc enforce typed values Non-breaking backwards compatible enhancement of decorators. Should not have the issues of #4110 which was reverted in #4129 Signed-off-by: Pelle Wessman <pelle@kodfabrik.se> * test: test typed decoration properties * Add support + tests for `getter`/`setter` interface * Use the same definition for all decoration methods --------- Signed-off-by: Pelle Wessman <pelle@kodfabrik.se>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Issue
When this PR was merged to main in this commit, it also removed all the changes made in this PR
Ideally AFAIC PR 2981 would be re-added. This might be a bit problematic since #3203 hijacked the first generic slot for all
decorate*
functions, so re-adding it would be a breaking change. Also this means that since typed decorators wasn't actually added in v4, the feature isn't and cannot be used by anyone.There's few options I can think of:
decorate*
functions in fastify v5typedDecorate*
functions that do the same asdecorate*
but with type checkingThere's also this tiny documentation change that should probably be removed now: https://github.com/fastify/fastify/pull/2981/files#diff-c2db295d2a99e431bb24ac08c3953353dbb702f62b48587aa2cd76a0b78e0dbf
The text was updated successfully, but these errors were encountered: