GeezerVison is showing github.com — typings: remove unused primordials by anonrig · Pull Request #48509 · nodejs/node
Conversation
anonrig
commented
Jun 21, 2023
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
This pull request removes unused and confusing primordials such as ArrayLength which corresponds to Array.length, and even though it is not used at all it is often get confused by Array.prototype.length.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
bricss and lin72h reacted with thumbs up emoji
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.
I think it's ok to remove them because they are useless for the codebase, but the typings are correct. ArrayLength is a number, not a function:

Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
aduh95 reacted with thumbs up emoji
aduh95
left a comment
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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.
I have a few issues with this PR:
- Can you fix the commit title so it says
unused and not invalid? There's nothing invalid about them, e.g. ArrayLength is the primordial value of Array.length, which is arguably not very useful, but certainly not invalid.
- Should we also remove the other ones that we deem not useful? E.g.
ArrayName, the primordial value of Array.name is unlikely to ever be used in the codebase. Removing only .length feels arbitrary.
- There's a non-zero risk that someone with good intentions sees it's missing and make essentially a revert PR so the types are complete again, so could you replace them with comments explaining why they are not included?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
anonrig
changed the title
typings: remove invalid primordials
typings: remove unused/confusing primordials
Jun 22, 2023
anonrig
changed the title
typings: remove unused/confusing primordials
typings: remove unused primordials
Jun 22, 2023
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
author ready
PRs with CI started, the required approvals, and no outstanding review comments.
typings
Issues and PRs related to internal TypeScript declarations.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|