manolo / gwt-api-generator

Generator for creating GWT JSInterop clients from Polymer Web Components
Apache License 2.0
50 stars 24 forks source link

Can't generate proper function with return type #85

Open hugree opened 6 years ago

hugree commented 6 years ago

I'm trying to expose AppLocalizeBehavior's localize method by introducing a custom component that I want to use on the GWT side.

I added a simple function

translate: function (language, resources, formats) {
        return this.__computeLocalize(language, resources, formats);
}

or even a simpler case with

testreturn: function () {
        return "something";
    }

However the problem is the generated code still uses void

public void translate(Object e, Object o, Object n) {
        getPolymerElement().translate(e, o, n);
    }

What am I missing here?

Waxolunist commented 5 years ago

I think you are missing the jsdoc comments see https://polymer-library.polymer-project.org/2.0/docs/tools/documentation