Open
Description
π 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 (const x of document.querySelectorAll('div')) {}
π Actual behavior
- No error if
"lib"
is omitted fromtsconfig.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