-
Notifications
You must be signed in to change notification settings - Fork 2k
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
make toggleAttribute match with native signature #5372
Conversation
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.
SFTM. I will let @keanulee review as well.
This seems fine to me. @azakus you think this will be okay for internal users? |
Any chance we can get this merged? Also, does anyone know what the plan is for next release so i have a rough idea of when we'll get this? (the next time we tag & npm publish it) |
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.
Yeah, I don't see anything that should be a problem for internal users.
We're still on TS <3.1 internally too, so that's a bonus.
Fixes #5364, again.
This solution is needed instead of #5371 as that would break TS definitions for consumers using TS <3.1.
I had to use
arguments
(unfortunately) because otherwise the function signature does not match the JSDoc, which seems more confusing than a a littlearguments
check.This produces correct types which are identical to the native
toggleAttribute
, while still supporting our third argument behind the scenes in JS.cc @TimvdLippe
Supersedes and closes #5371