Skip to content

Invalid type error for map for-of loop #2813

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

Open
arv opened this issue Feb 9, 2018 · 2 comments
Open

Invalid type error for map for-of loop #2813

arv opened this issue Feb 9, 2018 · 2 comments

Comments

@arv
Copy link
Contributor Author

arv commented Feb 9, 2018

I guess this comes down to the Map iterator returning ([K, V], [K, V] ...) and JSCompiler does not know better than to treat these as Array<K|V>. Maybe there needs to be some special case for this since this pattern is super useful.

@arv
Copy link
Contributor Author

arv commented Feb 9, 2018

Related to #379

@concavelenz 👋 I saw your todo in the externs file...

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

1 participant