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

types(AutocompleteOption): fix and improve types #8069

Merged
merged 1 commit into from
Jun 13, 2022

Conversation

ImRodry
Copy link
Contributor

@ImRodry ImRodry commented Jun 11, 2022

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

The type of AutocompleteOption#value was wrong so I went ahead and fixed that and also made the other properties more accurate (made focused not optional and type more specific).

Status and versioning classification:

  • 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

@vercel
Copy link

vercel bot commented Jun 11, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
discord-js ⬜️ Ignored (Inspect) Jun 12, 2022 at 11:21AM (UTC)

@ImRodry
Copy link
Contributor Author

ImRodry commented Jun 11, 2022

In a weird twist of events it turns out value is always a string when an option is focused and, since this interface is only used for focused autocomplete options I went ahead and changed that type and its name

Copy link
Member

@Jiralite Jiralite left a comment

Choose a reason for hiding this comment

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

AutocompleteOption JSDoc needs updating too!

Co-Authored-By: Almeida <almeidx@pm.me>
@ImRodry ImRodry force-pushed the types/autocompleteoption-fix branch from 5a50155 to 1d6d1cd Compare June 12, 2022 11:20
@iCrawl iCrawl merged commit 476b7d5 into discordjs:main Jun 13, 2022
@ImRodry ImRodry deleted the types/autocompleteoption-fix branch June 13, 2022 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants