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: compare with undefined
directly
#9191
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
github-actions
bot
requested review from
iCrawl,
kyranet,
SpaceEEC and
vladfrangu
March 3, 2023 01:43
vladfrangu
approved these changes
Mar 3, 2023
SpaceEEC
approved these changes
Mar 3, 2023
Codecov Report
@@ Coverage Diff @@
## main #9191 +/- ##
=======================================
Coverage 83.70% 83.70%
=======================================
Files 100 100
Lines 9550 9550
Branches 1101 1101
=======================================
Hits 7994 7994
Misses 1517 1517
Partials 39 39
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
kyranet
approved these changes
Mar 12, 2023
cyan-2048
pushed a commit
to cyan-2048/discord.js
that referenced
this pull request
May 8, 2024
* refactor: compare with `undefined` directly * fix: lint
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please describe the changes this PR makes and why it should be merged:
Updated all of the
typeof x === "undefined"
intox === undefined
(also !==) as it is needlessly verbose since in strict mode the only reason to usetypeof
is ifx
might not be declaredThis also brings in more consistency since
x === undefined
was already being used in some places (!== too), e.g.discord.js/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts
Line 34 in dc142c4
discord.js/packages/discord.js/src/managers/ChannelManager.js
Line 22 in dc142c4
Status and versioning classification: