🔎 Search Terms
lib, dom, dom.iterable
🕗 Version & Regression Information
- An issue as of TypeScript 5.7.2
⏯ Playground Link
No response
💻 Code
// Does TypeScript have the types for DOM iteration?for(constxofdocument.querySelectorAll('div')){}🙁 Actual behavior
- No error if
"lib" is omitted from tsconfig.json. - Error if
"lib" is ["es2024", "DOM"] - No error if
"lib" is ["es2024", "DOM", "DOM.iterable"]
🙂 Expected behavior
Given how broadly supported DOM.iterable is, it should be part of DOM by now(?)
Interestingly, es2024.full looks like this but can’t be used as a value of "lib":
/// <reference lib="es2024" />/// <reference lib="dom" />/// <reference lib="webworker.importscripts" />/// <reference lib="scripthost" />/// <reference lib="dom.iterable" />/// <reference lib="dom.asynciterable" />
Additional information about the issue
No response
🔎 Search Terms
lib, dom, dom.iterable
🕗 Version & Regression Information
⏯ Playground Link
No response
💻 Code
🙁 Actual behavior
"lib"is omitted fromtsconfig.json."lib"is["es2024", "DOM"]"lib"is["es2024", "DOM", "DOM.iterable"]🙂 Expected behavior
Given how broadly supported DOM.iterable is, it should be part of DOM by now(?)
Interestingly, es2024.full looks like this but can’t be used as a value of
"lib":Additional information about the issue
No response