Using what Thomas said works good. I've had the same question about using
Object literals. So I wrote down some examples and stored them here. You
may need 2.8 +(nightly) to use some of the example options.
http://docs.sencha.com/gxt/4.x/gwt/jsinterop/jsinterop_object_literals.html
On Thursday,
Bloat and performance is one reason. However, the real reason is that
frameworks like react and redux choke if you pass anything but a plain
JavaScript object to some of their API's. I don't really care what the
annotation is e.g. JsStruct or JsLiteral would work just as well.
On Thursday, Apr
On Wednesday, April 6, 2016 at 5:46:49 PM UTC+2, Paul Stockley wrote:
>
> This is the only way you can create a true object literal equivalent in
> JsInterop (i.e. no prototype other than Object)
>
The real question is whether (and why) you need "no prototype other than
Object", other than fo
This is the only way you can create a true object literal equivalent in
JsInterop (i.e. no prototype other than Object)
The following is as close as you can get to say { prop1 : 1 }
JsType(isNative=true, namespace=JsPackage.GLOBAL, name="Object")
class SomeLiteral() {
int prop1
}
SomeLitera