haxetink / tink_core

Core utilities
https://haxetink.github.io/tink_core
MIT License
116 stars 33 forks source link

Add js-compat flag. #161

Closed back2dos closed 3 years ago

back2dos commented 3 years ago

This should make tink_based code more easily usable from JS/TS:

back2dos commented 3 years ago

Promises and futures are taken care of. As for enums, I want to handle it separately.

kevinresol commented 3 years ago

Probably we can teach genes to take care of the enum generation

benmerckx commented 3 years ago

futures and promises will be thenables (if not even js promises)

Curious what that would have looked like?

back2dos commented 3 years ago

Well, it's not really possible, at least not without throwing laziness / suspension out the window, which is quite undesirable. As a middle ground, I've implemented the full promise interface.