google / jsinterop-generator

Generates Java annotated with JsInterop from JavaScript extern sources
Apache License 2.0
75 stars 24 forks source link

@DoNotAutobox is absent from several Js methods - why? #20

Closed realityforge closed 5 years ago

realityforge commented 5 years ago

I am just trying to understand why several of the methods in the Js class do not have the @DoNotAutobox annotation on their object parameters when presumably they should. Examples include the "as" methods and supporting infrastructure. i.e. Js.asBoolean(obj) and thus InternalJsUtil.asBoolean(obj), as well as Js.coerceToDouble(obj).

Is it just because it is assumed that humans invoking this are smart enough to not misuse them and the code is unlikely to be used in code generators? What would be the penalty of adding them?

realityforge commented 5 years ago

Closing as issue was created in wrong repository. Question has been moved to google/jsinterop-base#12