Programming Guides
TypeScript 5.7 Iterator Helpers: Transform Data Without Arrays
The Iterator Helpers proposal reached Stage 3 and TypeScript 5.7 ships built-in types. Map, filter, and reduce on any iterable without allocating intermediate arrays.

JavaScript has always had iterables Map, Set, NodeList, generators and String but transforming them required converting to an array first. Iterator Helpers (Stage 3) add map, filter, take, drop, and reduce directly on Iterators. TypeScript 5.7 ships the type declarations.
Every [...largeSet].filter().map() allocates two arrays. For large collections this is measurable GC pressure. Iterator Helpers return lazy wrappers that compute nothing until iterated.
Available methods: map, filter, take, drop, flatMap, reduce, toArray, forEach, some, every, find.
Take paginated results with lazy slicing: a generator with .take(500) short-circuits after 500 items pass the filter. No need to fetch all pages then slice.
TypeScript 5.7 ships Iterator.prototype methods in lib.esnext.d.ts. Enable with target: ESNext or lib: ["ES2023", "ESNext.Iterator"].
When not to use: need random access (use arrays), tiny lists under ~100 items, or debugging opaque chains (use toArray).
Iterator pipeline is to collections what async/await is to callbacks.