google/jsinterop-base

Add support for JsPropertyMap.keys()

realityforge opened this issue · 2 comments

Would you consider an addition of a method like JsArrayLike<T> keys() added to the JsPropertyMap<T> class?

I was looking through our projects, and a lot of them only use the elemental2-core library to make use of the JsObject.keys() method. It looks like it would be possible to remove the elemental2-core with this small addition to JsPropertyMap and it seems to make sense.

gkdn commented

The main reason it wasn't include was because it wasn't clear where to put a line on which method to include from jsinterop-base classes so we sticked with things that require writing JS by hand.
However I don't mind if this makes big difference for our users.

After further investigation it seems that this change is of less value for use (at least for use). We usually invoke JsArray methods on the result and thus would need to bind to elemental2-core anyway. So I am going to close this for now