-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(GuildAuditLogsEntry): correct mapped AuditLogChange
objects
#10438
Merged
kodiakhq
merged 3 commits into
discordjs:main
from
Renegade334:auditlogchange-correct-mapped-objects
Aug 20, 2024
Merged
fix(GuildAuditLogsEntry): correct mapped AuditLogChange
objects
#10438
kodiakhq
merged 3 commits into
discordjs:main
from
Renegade334:auditlogchange-correct-mapped-objects
Aug 20, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
Renegade334
changed the title
refactor(GuildAuditLogsEntry): correct mapped
fix(GuildAuditLogsEntry): correct mapped Aug 8, 2024
AuditLogChange
objectsAuditLogChange
objects
kyranet
approved these changes
Aug 19, 2024
SpaceEEC
approved these changes
Aug 19, 2024
vladfrangu
approved these changes
Aug 20, 2024
nyapat
pushed a commit
to nyapat/discord.js
that referenced
this pull request
Sep 9, 2024
…scordjs#10438) * refactor(GuildAuditLogsEntry): correct mapped AuditLogChange objects * test: check union narrowing behaviour of AuditLogChange --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This was referenced Sep 24, 2024
nyapat
pushed a commit
to nyapat/discord.js
that referenced
this pull request
Oct 4, 2024
…scordjs#10438) * refactor(GuildAuditLogsEntry): correct mapped AuditLogChange objects * test: check union narrowing behaviour of AuditLogChange --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This was referenced Oct 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please describe the changes this PR makes and why it should be merged:
AuditLogChange
imply that theold
andnew
parameters are optional, matching the optionalold_value
andnew_value
parameters of theAPIAuditLogChange
object passed into the map function. This wasn't reflected by the previous implementation, where these parameters in the output mapped object were always set, but their value wasundefined
if the relevant parameter wasn't set in the source object.old
andnew
parameters are truly optional, and are not set if their source parameter is not set.AuditLogChange
is now a correctly mapped union type, which means that it's now possible to narrow the object type based onchange.key
.Resolves #10437.
Status and versioning classification: