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

fix(Partials): correctly set properties as nullable #4636

Merged
merged 7 commits into from Aug 12, 2020

Conversation

NotSugden
Copy link
Contributor

Please describe the changes this PR makes and why it should be merged:
This PR changes some properties to be explicitly set to null, as they are supposed to be, from structures that can be partial

There is also a change from truthy checks to 'x' in data in the _patch methods of said structures
Status

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating
    • I've done a brief check, but it seems to all be covered by the Partial* interfaces

Semantic versioning classification:

  • This PR changes the library's interface (methods or parameters added)
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • This PR only includes non-code changes, like changes to documentation, README, etc.

@iCrawl iCrawl requested a review from SpaceEEC July 17, 2020 08:19
@NotSugden NotSugden mentioned this pull request Aug 3, 2020
5 tasks
Copy link
Member

@vladfrangu vladfrangu left a comment

Choose a reason for hiding this comment

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

This PR looks 👍 however won't this be considered a bit breaking as now certain properties known to be "always present" are now "possibly present"? Also, are these changes reflected in the typings? 😅

@NotSugden
Copy link
Contributor Author

yeah it could be considered breaking for properties like User#bot i suppose, since now it can be null, whereas before it would always default to false (although that behaviour was a bug), and i have done my best to reflect all the changes in the typings

@iCrawl
Copy link
Member

iCrawl commented Aug 11, 2020

Needs a rebase.

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

Successfully merging this pull request may close these issues.

None yet

4 participants