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

Wrong Type declarations for .all() and .nextv() methods AbstractKeyIterator and AbstractValueIterator #86

Open
bredthau opened this issue Apr 20, 2024 · 1 comment
Labels
bug Something isn't working pull request welcome A pull request is welcome

Comments

@bredthau
Copy link

According to the typescript declarations the Promise overloads of .all() and .nextv() of AbstractKeyIterator return Promise<[K]>. However they should return a promise to an array of type K (so Promise<K[]> or Promise<Array<K>>). Similarly the Callback versions are declared to take NodeCallback<[K]> where it should be NodeCallback<Array<K>>.
The same situation exists for AbstractValueIterator, only with [V] where it should be Array<V> instead of [K].

@vweevers vweevers added bug Something isn't working pull request welcome A pull request is welcome labels Oct 21, 2024
@vweevers
Copy link
Member

vweevers commented Oct 21, 2024

PR is welcome. Let's use the K[] notation rather than Array<K> (same as #67).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pull request welcome A pull request is welcome
Projects
None yet
Development

No branches or pull requests

2 participants