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
types: add generic to ActionRowBuilder.from()
#8414
types: add generic to ActionRowBuilder.from()
#8414
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
ActionRowBuilder#from()
ActionRowBuilder.from()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a rebase + tests.
@Syjalo is attempting to deploy a commit to the discordjs Team on Vercel. A member of the Team first needs to authorize it. |
Codecov Report
@@ Coverage Diff @@
## main #8414 +/- ##
==========================================
+ Coverage 84.35% 86.85% +2.49%
==========================================
Files 98 87 -11
Lines 9180 8808 -372
Branches 1096 1117 +21
==========================================
- Hits 7744 7650 -94
+ Misses 1394 1116 -278
Partials 42 42
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Please describe the changes this PR makes and why it should be merged:
This PR adds generic type to
ActionRowBuilder.from()
. Currently we can create typedActionRowBuilder
using the.from()
static method only these ways.But these ways are wrong, because we can create an
ActionRowBuilder<ButtonBuilder>
, but type it asActionRowBuilder<SelectMenuBuilder>
. This PR adds a new correct way to do that.Now the return type is typed and you can't add other types of action rows to the
.from()
method.Status and versioning classification: