-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
docs(eslint-plugin): [prefer-for-of] mention DOM elements and lib: dom.iterable #11642
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
docs(eslint-plugin): [prefer-for-of] mention DOM elements and lib: dom.iterable #11642
Conversation
|
Thanks for the PR, @JoshuaKGoldberg! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
View your CI Pipeline Execution ↗ for commit d02375f
☁️ Nx Cloud last updated this comment at |
| {/* Intentionally Omitted: When Not To Use It */} | ||
| ## DOM Elements | ||
|
|
||
| By default, TypeScript's type checking only allows `for-of` loops over DOM iterables such as `HTMLCollectionOf` when the `dom.iterable` `lib` option is enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth noting that this is basically a TS bug and will be changed in TS 6. There are probably better references but this is discussed at microsoft/TypeScript#62196
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm so excited for TS 6 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kirkwaiblinger I'm a little hesitant to mention "this might change hopefully probably" - do you mind if we leave it out of the docs for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think this one is pretty safe to count on to be in TS 6 (another ref here microsoft/TypeScript#54500), but I'm also ok if we leave it off and update the docs again in the future 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set a calendar reminder for December 1st if we don't get to it by then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the issue I was thinking of
| {/* Intentionally Omitted: When Not To Use It */} | ||
| ## DOM Elements | ||
|
|
||
| By default, TypeScript's type checking only allows `for-of` loops over DOM iterables such as `HTMLCollectionOf` when the `dom.iterable` `lib` option is enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think this one is pretty safe to count on to be in TS 6 (another ref here microsoft/TypeScript#54500), but I'm also ok if we leave it off and update the docs again in the future 👍
692d4ee
into
typescript-eslint:main

PR Checklist
Overview
As a nice side effect, this reduces the "Intentionally Omitted: When Not To Use It" comments from 7 to 6.
💖