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

Types #33

Open
erikras opened this issue Mar 4, 2019 · 1 comment
Open

Types #33

erikras opened this issue Mar 4, 2019 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@erikras
Copy link
Member

erikras commented Mar 4, 2019

This library was conceived before the TS and Flow teams had formalized how to type hooks. I still have not looked into it, but if someone knows how, it would be great to get some typing while the library is still so tiny.

I wouldn't even object to a strong TS lover converting the library itself to TS, ideally with Flow types also exported.

Thanks in advance. 🙏

@erikras erikras added enhancement New feature or request help wanted Extra attention is needed labels Mar 4, 2019
@alitaheri
Copy link

alitaheri commented Jun 18, 2019

@erikras I have already migrated your code to a very type safe version. of course I have trimmed some of the functionalities I didn't need. But they can be added easily. I wanted to share this and get other type lovers opinion on it.

https://gist.github.com/alitaheri/32ac56575045d6e498008f73e231fccd

I've also solved the issue with callbacks not being cached. take a look and give me your opinion on it. If it's acceptable I can make a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants