We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Convert to forEach isn't available for many types of for-of loops.
Convert to forEach
Allow any kind of expression instead of https://github.com/nicoespeon/abracadabra/blob/main/src/refactorings/convert-for-to-for-each/convert-for-to-for-each.ts#L113-L119 Edit: special case for string and map (if the type can be inferred)
Example cases where it currently doesn't work, but should:
for (const item of items) { } // items isn't declared (or vscode doesn't know about it) const getItems = () => ['foo', 'bar', 'baz']; for (const item of getItems()) { }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe what's missing
Convert to forEach
isn't available for many types of for-of loops.How would it work
Allow any kind of expression instead of https://github.com/nicoespeon/abracadabra/blob/main/src/refactorings/convert-for-to-for-each/convert-for-to-for-each.ts#L113-L119
Edit: special case for string and map (if the type can be inferred)
Expected behavior
Example cases where it currently doesn't work, but should:
Screenshots
Additional information
The text was updated successfully, but these errors were encountered: