-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Fix the type of copyWithin
#53340
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
Fix the type of copyWithin
#53340
Conversation
Only the first parameter of `copyWithin` is required, contrary to the type in the typedef. This commit fixes that type to allow correct usage of the `copyWithin` function. See [the usage of copy within](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin).
35bdb24 to
f581696
Compare
|
The type change looks fine to me (making it optional), although I'm not sure about all of that extra JSDoc outlining the edge cases. |
RyanCavanaugh
left a comment
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.
The linked bug is to change the signature, not the JS Doc, so please just change the signature. Please file a separate issue if you want to change the doc comments too.
You got it. No change at all? Or should it at least mention start's being omitted? I can update again if it’s more desirable to have no change at all in the JS Doc (despite the signature changing). But it makes sense that the JS Doc should at least mention the updated signature. |
I got a little ambitious 😅. Apologies! |
|
Thanks! |
Only the first parameter of
copyWithinis required, contrary to the type in the typedef. This commit fixes that type to allow correct usage of thecopyWithinfunction. See the usage ofcopyWithin.Fixes #53334