Replies: 3 comments 1 reply
-
One more question… We already briefly talked about class vs prototype object (I think this could also be named ES6 class vs ES5 class). The only reason why I'm bringing this up again is because I didn't know how to make proper types for it. Do you remember what the performance difference was? Did you read about it or did you even have a benchmark test or something for this library? I genuinely don't know about the performance difference, but searching online I stumbed across a StackOverflow question about this and the theory that a class was slower was kindof dismissed – at least it depends on the specifics maybe. So I tried to do a comparison on jsben.ch and the result is that both are pretty much identical (I ran this with Firefox and Safari). I don't know how realistic my benchmark is as it is obviously a simplified version of the code and the test is basically, creating a lot of new instances and then calling a function on it. Maybe there have been advancements in browsers how well ES6 classes are supported. So, by no means do I want to say that the |
Beta Was this translation helpful? Give feedback.
-
Good idea. I'll close #42 and leave a comment there to see this discussion.
|
Beta Was this translation helpful? Give feedback.
-
Hey @Manc, I've been working on the types in the past couple weeks, following your lead. How is it looking now from your perspective? |
Beta Was this translation helpful? Give feedback.
-
Hi @jmeistrich,
it's probably best to continue #42 here in a discussion as I may have more questions which are no longer really related to that ticket.
So my first questions are about
NodeValue
:proxy
property (currently an optional unspecifiedobject
)? Is there already a type anywhere or should a new one be created? Is there a particular reason why it'sobject
?getNodeValue
do or return? The argument ofgetNodeValue
is aNodeValue
and returnsany
. Maybe this can be made a bit clearer.Beta Was this translation helpful? Give feedback.
All reactions