Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript definitions #3

Open
lukiano opened this issue May 23, 2017 · 1 comment
Open

Typescript definitions #3

lukiano opened this issue May 23, 2017 · 1 comment

Comments

@lukiano
Copy link

lukiano commented May 23, 2017

Not an issue per se, I was trying to do the same proof of concept as you did, but for TypeScript.

Wondering how could the generators work so well for Promises (async/await in TS transpiles into generators), but not for any object that has map/flatmap methods. So I encountered the need for cloneable generators, and when googled it, found your project!

Have you ever tried to check if this could work with types?

@pelotom
Copy link
Owner

pelotom commented May 23, 2017

Hi Lukiano, since monads require abstracting over type constructors I don't believe this library can be typed in a straightforward way until TypeScript gets support for higher-kinded types; see this issue. However it might be possible to do using this technique. I'd welcome a pull request if you'd like to give it a try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants