elsassph / hxtsdgen

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

abstract gen error #2

Open longde123 opened 5 years ago

longde123 commented 5 years ago

https://github.com/hamaluik/haxe-glm

eg @:expose("glm.Mat2") abstract Mat2(Mat2Base)

then ts

export namespace glm { class Mat2 { private constructor(); static _new(_r0c0: number, _r0c1?: number, _r1c0?: number, _r1c1?: number): glm.Mat2Base;

fullofcaffeine commented 5 years ago

@longde123 Is this still happening for you with the latest hxtsdgen and Haxe versions? If so, could you describe what you'd expect to be generated instead?

elsassph commented 5 years ago

I'm afraid this kind of abstract can't be really exported: this requieres compiler awareness to rewrite code to use this kind of static methods to create/operate on the abstracted types.