### ⚙ Compilation target ESNext ### ⚙ Library lib.esnext.d.ts ### Missing / Incorrect Definition global Iterator class ### Sample Code ```TypeScript Iterator.from([1, 2, 3, 4, 5]) .map(n => n + 1) .filter(n => n > 2) .drop(1) .take(2) .toArray() // [4, 5] ``` See also all the validation tests (working since Node.js 22.0.0) at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator#iterator_helpers However, the following code should (ideally) continue working: ``` const customIterator: Iterator<number> = { next: () => ({ value: 42 }) }; ``` ### Documentation Link * TC39 Proposal: https://github.com/tc39/proposal-iterator-helpers * MDN Documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator#iterator_helpers
⚙ Compilation target
ESNext
⚙ Library
lib.esnext.d.ts
Missing / Incorrect Definition
global Iterator class
Sample Code
See also all the validation tests (working since Node.js 22.0.0) at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator#iterator_helpers
However, the following code should (ideally) continue working:
Documentation Link