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(typings): explicitly type PremiumTier and Collectors #5458

Merged
merged 2 commits into from
Apr 14, 2021
Merged

feat(typings): explicitly type PremiumTier and Collectors #5458

merged 2 commits into from
Apr 14, 2021

Conversation

Vendicated
Copy link
Contributor

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

CollectionFilter is now generic. All collectors are now properly typed. For example the filter for channel.awaitMessages is now (arg0: Message) => boolean

PremiumTier is now typed explicitly instead of simply as number

Status and versioning classification:
The only case in which these changes are breaking is if the user did something wrong in which case their code would break anyway

  • 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

@Fyko
Copy link
Contributor

Fyko commented Apr 2, 2021

This PR seems to be a duplicate of or superseded by #5447

@kyranet
Copy link
Member

kyranet commented Apr 2, 2021

This PR seems to be a duplicate of or superseded by #5447

#5447 implements many other changes, but doesn't strict type PremiumTier, which this PR also does.

@Vendicated
Copy link
Contributor Author

should I remove my other changes and only leave the premiumtier change?

@kyranet kyranet requested review from vladfrangu and iCrawl April 14, 2021 19:50
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.

🥰🥰

@iCrawl iCrawl changed the title Explicitly type PremiumTier and Collectors feat(typings): explicitly type PremiumTier and Collectors Apr 14, 2021
@iCrawl iCrawl merged commit 7c49612 into discordjs:master Apr 14, 2021
@iCrawl iCrawl added this to the Version 13 milestone Jun 27, 2021
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.

7 participants