Export @JsType to javascript env #213
Replies: 2 comments 3 replies
-
I was also exploring how to export Java types including properties to JS environment. I found another way to keep the names (aka export). For example, if we put the following code in
I'm not sure we could export Java classes and properties in a similar way, IF Closure API doesn't have good support for this. |
Beta Was this translation helpful? Give feedback.
-
Probably exporting static doesn't work since it gets evaluated during call of For general exporting guidance for exports and instance properties is here: |
Beta Was this translation helpful? Give feedback.
-
Hello, we are migrating from GWT2 to J2CL, and there is an issue with @jstype. In GWT2 it works well (ofc with generateJsInteropExports).
For now, I managed to export only methods, but I can't make class properties to be exported.
Let's say I have a simple POJO:
My export is like this one:
So, methods export works fine, but I need help managing the export fields. I tried `goog.export property like this:
But it doesn't work, it looks like I do something wrong.
Beta Was this translation helpful? Give feedback.
All reactions