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

Always visit _all_ super arguments #24802

Merged
merged 1 commit into from
Jun 8, 2018

Conversation

weswigham
Copy link
Member

Because forEach bails when the function you pass returns something, eg, a type.

@weswigham weswigham requested a review from mhegazy June 8, 2018 19:16
@mhegazy
Copy link
Contributor

mhegazy commented Jun 8, 2018

Please port to release-2.9 as well.

@ajafff
Copy link
Contributor

ajafff commented Jun 8, 2018

There are a lot more occurrences of that pattern. forEach with a checkXyz function as callback.
Are all of them potentially wrong?

@weswigham weswigham merged commit 4240d9d into microsoft:master Jun 8, 2018
@weswigham weswigham deleted the use-every-not-foreach branch June 8, 2018 20:11
weswigham added a commit to weswigham/TypeScript that referenced this pull request Jun 8, 2018
weswigham added a commit that referenced this pull request Jun 9, 2018
@weswigham
Copy link
Member Author

@ajafff Only the ones that return Type, probably. IMO, if we ignore the result of a forEach and the result is potentially truthy we should have an error.

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.

3 participants