-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remove extends = Object
from js_sys::{Number,JsString}
?
#1445
Comments
cc @Pauan, you've likely got thoughts on this! |
This is still fine, as they do inherit all the methods from For example, |
My thoughts on this are rather nuanced, so I'll need a bit of time to formulate a response, but @RReverser is correct that the |
Ah ok intersting! I was unware of that :) I'm gonna go ahead and close this, but @Pauan if you feel there's action that we need to take here a new issue/PR would be good! |
Well, I had a detailed reply all written up, but after thinking about it, I like the current plan better: shift |
In #1405 we seem to be leaning towards
JsString
both representing the nativeString
class as well as the string primitive in JS. I suspect we'd want to do the same forNumber
too!Currently, though, both these types inhereit from
Object
which means theyDeref
toObject
. If we use native strings inJsString
(which we actually already do) then this may not be quite right.Should we remove the
extends
annotation from these types so they both deref toJsValue
?The text was updated successfully, but these errors were encountered: