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

Fix typing of Y.Map iterators #590

Merged
merged 1 commit into from
Nov 20, 2023
Merged

Fix typing of Y.Map iterators #590

merged 1 commit into from
Nov 20, 2023

Conversation

haines
Copy link
Contributor

@haines haines commented Oct 25, 2023

Some of Y.Map's methods are typed as returning IterableIterator<any>, but they could be stronger. This PR replaces the any with the appropriate type parameter as follows:

method new return type
values() IterableIterator<MapType>
entries() IterableIterator<[string, MapType]>
[Symbol.iterator]() IterableIterator<[string, MapType]>

Signed-off-by: Andrew Haines <andrew@haines.org.nz>
@dmonad dmonad merged commit 289ff16 into yjs:main Nov 20, 2023
0 of 2 checks passed
@haines haines deleted the map-iterator-types branch November 20, 2023 11:42
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 this pull request may close these issues.

2 participants