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(BaseManager): properly type valueOf #4594

Merged
merged 1 commit into from
Aug 11, 2020

Conversation

almostSouji
Copy link
Member

Please describe the changes this PR makes and why it should be merged:

BaseManager#valueOf returns its cache collection, but the return is currently typed as :Object. This PR documents types the return value based on key and holdings.

Further considerations:

Whether or not valueOf should even return a Collection in the first place is another topic, which should be discussed for the next semver major. This is (according to @monbrey) the case due to Util#toJSON expecting to find Collections there to extract the appropriate data for use cases like broadcast evaluations.

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

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 merged commit b4d6510 into discordjs:master Aug 11, 2020
@almostSouji almostSouji deleted the typings-basemanager-valueof branch April 6, 2021 20:20
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.

4 participants