For js, specifically : https://haxe.org/manual/target-javascript.html
Coincidentally, Haxe Foundation announced a new version here today : https://haxe.org/blog/haxe-4.1.0-release/
(disclosure : member of Haxe compiler team)
What's your definition of transpiling and what are you looking for?
* I personally find the difference meaningless, lots of languages use intermediate compilation targets like C or JS or LLVM IR or assembly so transpiling and compiling mean the same thing to me
Just adding as it might interest someone :)
Elm/Purescript syntaxes are not my kink. Open to other suggestions though.
Types absolutely are a first class citizen in TypeScript. Especially coming from Go, which doesn't even support generics, Typescript is really quite powerful. It even has support for ADTs via discriminated unions, which gives you the same power of enums with associated types that you'd get in Rust/Swift.
Is it possible the reason you feel like Typescript doesn't have Types as a first class citizen is because it leverages structural typing rather than nominal typing?
However coming from languages where types are a first element of the language (c++, rust, go...), I often miss a lot of features in typescript (e.g. type conversion overload, generic specialization, etc...)
I know that by design Typescript doesn't want those features and I understand the rationale behind it. I'm just wondering if I'm the only one in that case and if someone would know a language transpiling (not compiling) to JS more appropriate to my tastes (and hence with different goals).