elsassph / hxtsdgen

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

Option to separate typedef and interface definitions #25

Closed elsassph closed 4 years ago

elsassph commented 5 years ago

Using option -D hxtsdgen_types_ts allows generating typedef/interface into an extra .d.ts file. Classes and functions are still emitted in the main .d.ts, and the concrete enums option still allows producing the extra enums .ts.

Enums/types file names can be customised:

-D hxtsdgen_enums_ts=othername
-D hxtsdgen_types_ts=somename

For safer code generation, Haxe types are now flattened, e.g. com.foo.Thing -> com_foo_Thing.