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
refactor(formatters): Add support for object and name param in formatEmoji()
#10076
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
There's some formatting and linting issues, could you please fix them? And it'd be nice if you added tests for the changes |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #10076 +/- ##
==========================================
+ Coverage 58.36% 58.44% +0.08%
==========================================
Files 242 242
Lines 17184 17224 +40
Branches 1243 1245 +2
==========================================
+ Hits 10029 10067 +38
- Misses 7110 7112 +2
Partials 45 45
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
emojiId, | ||
animated, | ||
name, | ||
}: Required<FormatEmojiOptions<EmojiId, Name>>): `<:${Name}:${EmojiId}>` | `<a:${Name}:${EmojiId}>`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like more overloads will be required for the specific results here. This is more of a general one.
emojiId is a required parameter, so no need to pass it in options I would do: formatEmoji(emojiId: Snowflake, animatedOrOptions?: boolean | { name?: string, animated?: boolean } ) and animated parameter is deprecated as we recommend to use options |
Just needs more overloads as Jiralite said here, other than that, looks good |
Please describe the changes this PR makes and why it should be merged:
formatEmoji()
emojiId
,animated
parametersStatus and versioning classification: