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

feat(decorators): support registering arg by createParameterDecorator #1680

Merged
merged 5 commits into from
May 30, 2024

Conversation

MichalLytek
Copy link
Owner

This PR is aiming to solve #1325.
It's based on #1330 PR by @russell-dot-js 🙌
Unfortunately, after #1400 that PR contained a lot of conflicts, and I was unable to push a commit with fixes into the upstream repo.

There are some differences between this PR and #1330.
Mainly, the signature of the createParamDecorator has been simplified and now arg options are the second argument of this function.
It also renames createParamDecorator to createParameterDecorator (v2 can have breaking changes).
The returnTypeFunc key has been changed to typeFunc as we describe the input type (I still need to adjust other decorators' signature).
Additionally, docs has been updated to reflect the new feature, so do the examples.
And there's now an entry to changelog about this.

@MichalLytek MichalLytek added Enhancement 🆕 New feature or request Community 👨‍👧 Something initiated by a community labels May 3, 2024
@MichalLytek MichalLytek added this to the 2.0 release milestone May 3, 2024
@MichalLytek MichalLytek self-assigned this May 3, 2024
Copy link

@russell-dot-js russell-dot-js left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woohoo. glad to see this get the light of day!

@MichalLytek MichalLytek force-pushed the support-arg-in-custom-decorator branch from 4676270 to a39482b Compare May 30, 2024 15:42
@MichalLytek MichalLytek merged commit bbcea46 into master May 30, 2024
5 checks passed
@MichalLytek MichalLytek deleted the support-arg-in-custom-decorator branch May 30, 2024 18:19
@MichalLytek MichalLytek linked an issue May 30, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community 👨‍👧 Something initiated by a community Enhancement 🆕 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom Param Decorator breaks other @Arg if not last argument
2 participants