Is there a functional language which compiles to JS and allows usage of JS libraries?
Here are some of my points:
- TypeScript is based on an amazing concept of being a superset of JS, which means that any valid JS code is also valid TS code, allowing usage of existing JS libraries.Now, TS is great, but I need a functional language which compiles to JS, and for which I do not have to sacrifice the JS libraries I already use.
- I use Elm to create web apps; let’s say I want to use Phaser and Box2D with Elm, I can’t do much except for passing on data back and forth.
- I thought about compiling Elm, or any other functional language like ClojureScript, PureScript, ElixirScript, to JS and merging it with my JS codebase, but that’s just painful. I am limited to only referring to the generated JS code from my hand-coded JS, but not the other way around.