Closed back2dos closed 3 years ago
Promises and futures are taken care of. As for enums, I want to handle it separately.
Probably we can teach genes to take care of the enum generation
futures and promises will be thenables (if not even js promises)
Curious what that would have looked like?
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.
This should make tink_based code more easily usable from JS/TS:
{ $type: 'Success', result: Data } | { $type: 'Failure', error: Failure }
(this can probably be a standalone lib that could process all enums)