elsassph / hxtsdgen

TypeScript declaration file generator for Haxe JavaScript output target
65 stars 12 forks source link

Properties generation look wrong #10

Closed elsassph closed 5 years ago

elsassph commented 5 years ago

Any variation of properties like:

@:expose
class G {
    var _field: String;
    public var field(get, set): String;
    function get_field(): String { return null; }
    function set_field(value: String): String { return _field = value; }
}

are generated as:

export class G {
    private constructor();
    field: string;
}

Haxe doesn't normally generate native JS getters, so get_field/set_field should be exposed.