There Is a roaadmap for supporto export import class in es6 with file split for classe. And and idea for a new target that emit code with file .d.ts?
I believe there is support for es6 since haxe 4.0.5 development.
Support for ts is via haxelib.
Pretty sure these are not perfect but I thought that OpenFL uses them to provide wider support, although they may manually also patch.
I don’t think there is any timescale attached they will mature with every new pull, but they are probably quite usable given some care?
yes but with big code split of a file for each class can be slow in haxe and should be made in ocaml direclty
I was hoping to eventually see this in Haxe but the issue tracking this was unfortunately closed recently: JS Code Splitting / Reloading · Issue #5831 · HaxeFoundation/haxe · GitHub
I experimented doing this in a custom generator:
GitHub - benmerckx/genes: Generates split ES6 modules and Typescript definitions from Haxe modules.
There’s also hxgenjs which has been around longer, although the typings are more basic (defaulting to “any”):
GitHub - kevinresol/hxgenjs: Extensible JS generator for Haxe
If it doesn’t find its way into the Haxe compiler you could go all the way and implement it as a compiler plugin.
i think that a merge of hxgenjs an hxtsgen can resolve the problem for the typing. but the problem are the performance. if the cache compiler can pass to an api only the files that are change should be possible regenerate only the file js that are changed with the corrispective classes haxe
In genes I managed to only recompile files when needed if you’re using a completion server. Full compile:
But in your project you do also the split of js files for class?