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

Better support for types #180

Open
isaiahtaylorhh opened this issue Feb 6, 2020 · 1 comment
Open

Better support for types #180

isaiahtaylorhh opened this issue Feb 6, 2020 · 1 comment

Comments

@isaiahtaylorhh
Copy link

Hello all, I hope you'll entertain an enhancement request. I'm enjoying the library so far but I'm wondering if we can get better type accuracy. One specific example would be:

get(key: string): Promise<any>;

Promise<any> could be clarified with X | Y | null, allowing for null checking, as that may often return null.

Thanks!

@mlynch
Copy link
Contributor

mlynch commented Mar 9, 2021

Thanks, will think about how to enable this in the next v3 release. Some kind of generic type could work here I think...

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

Successfully merging a pull request may close this issue.

2 participants