3 ms·
You're talking about two different things. Haxe is a different language, while TS is a superset of JS (all JS is valid TS). JS -> Haxe requires rewriting 10k l
by smt88 10y ago
You're talking about two different things. Haxe is a different language, while TS is a superset of JS (all JS is valid TS).
JS -> Haxe requires rewriting 10k lines before the program will run.
JS -> TS requires changing the file names, doing some imports, and adding "any" in a few places. The program will then run, and type information can be added gradually.
- nudpiedo 10y agoI do not see that much of differences between Haxe and JS, mostly because Haxe is a superset of EcmaScript. However the process is not that automatic because TypeScript is more permissive I would say (though there is already a convertor from typescript to haxe: ts2hx). But that said, I am not really that much experienced with TypeScript.
- deleted 10y ago[deleted]
- smt88 10y agoAccording to Wikipedia, Haxe is not a superset of ES: "Haxe is similar to ECMAScript, although almost no ECMAScript code will run on Haxe without modifications."
- sa_su_ke_75 10y agohaxe have some incompatibility with syntax js. like don't support classic for and in if statement null must be explicited (you must do if (x==null)). but thanks to macros the porting of js generic more simple.