diff --git a/tsc/internal/bundled/embed_generated.go b/tsc/internal/bundled/embed_generated.go
index 53166f01f98d9..4f9253dbdf6df 100644
--- a/tsc/internal/bundled/embed_generated.go
+++ b/tsc/internal/bundled/embed_generated.go
@@ -211,6 +211,8 @@ var (
libs_lib_esnext_full_d_ts string
//go:embed libs/lib.esnext.intl.d.ts
libs_lib_esnext_intl_d_ts string
+ //go:embed libs/lib.esnext.iterator.d.ts
+ libs_lib_esnext_iterator_d_ts string
//go:embed libs/lib.esnext.sharedmemory.d.ts
libs_lib_esnext_sharedmemory_d_ts string
//go:embed libs/lib.esnext.temporal.d.ts
@@ -330,6 +332,7 @@ var embeddedContents = map[string]string{
"libs/lib.esnext.error.d.ts": libs_lib_esnext_error_d_ts,
"libs/lib.esnext.full.d.ts": libs_lib_esnext_full_d_ts,
"libs/lib.esnext.intl.d.ts": libs_lib_esnext_intl_d_ts,
+ "libs/lib.esnext.iterator.d.ts": libs_lib_esnext_iterator_d_ts,
"libs/lib.esnext.sharedmemory.d.ts": libs_lib_esnext_sharedmemory_d_ts,
"libs/lib.esnext.temporal.d.ts": libs_lib_esnext_temporal_d_ts,
"libs/lib.esnext.typedarrays.d.ts": libs_lib_esnext_typedarrays_d_ts,
@@ -441,6 +444,7 @@ var libsEntries = []fs.DirEntry{
&fileInfo{name: "lib.esnext.error.d.ts", size: int64(len(libs_lib_esnext_error_d_ts))},
&fileInfo{name: "lib.esnext.full.d.ts", size: int64(len(libs_lib_esnext_full_d_ts))},
&fileInfo{name: "lib.esnext.intl.d.ts", size: int64(len(libs_lib_esnext_intl_d_ts))},
+ &fileInfo{name: "lib.esnext.iterator.d.ts", size: int64(len(libs_lib_esnext_iterator_d_ts))},
&fileInfo{name: "lib.esnext.sharedmemory.d.ts", size: int64(len(libs_lib_esnext_sharedmemory_d_ts))},
&fileInfo{name: "lib.esnext.temporal.d.ts", size: int64(len(libs_lib_esnext_temporal_d_ts))},
&fileInfo{name: "lib.esnext.typedarrays.d.ts", size: int64(len(libs_lib_esnext_typedarrays_d_ts))},
diff --git a/tsc/internal/bundled/libs/lib.esnext.d.ts b/tsc/internal/bundled/libs/lib.esnext.d.ts
index 044947f4d2aa0..d336210d567ba 100644
--- a/tsc/internal/bundled/libs/lib.esnext.d.ts
+++ b/tsc/internal/bundled/libs/lib.esnext.d.ts
@@ -25,3 +25,4 @@ and limitations under the License.
///
///
///
+///
diff --git a/tsc/internal/bundled/libs/lib.esnext.iterator.d.ts b/tsc/internal/bundled/libs/lib.esnext.iterator.d.ts
new file mode 100644
index 0000000000000..8cb2052698a9c
--- /dev/null
+++ b/tsc/internal/bundled/libs/lib.esnext.iterator.d.ts
@@ -0,0 +1,119 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABILITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+///
+
+export {};
+
+interface IteratorZipShortestOptions {
+ /**
+ * Stops when any input is exhausted.
+ */
+ mode?: "shortest";
+}
+
+interface IteratorZipLongestOptions {
+ /**
+ * Continues until every input is exhausted.
+ */
+ mode: "longest";
+
+ /**
+ * Values used when an input is exhausted before the others.
+ */
+ padding?: T;
+}
+
+interface IteratorZipStrictOptions {
+ /**
+ * Requires every input to yield the same number of values.
+ * If not, a `TypeError` will be thrown when an input is exhausted before others.
+ */
+ mode: "strict";
+}
+
+type IteratorZipOptions =
+ | IteratorZipShortestOptions
+ | IteratorZipLongestOptions
+ | IteratorZipStrictOptions;
+
+type IteratorInput = Iterable | Iterator;
+
+type IteratorInputTuple = readonly [] | readonly [IteratorInput, ...IteratorInput[]];
+
+type IteratorYield = T extends IteratorInput ? U : never;
+
+type IteratorZipResult = {
+ -readonly [K in keyof T]: IteratorYield | TExtra;
+};
+
+declare global {
+ interface IteratorObject {
+ /**
+ * Creates an iterator whose values are arrays containing successive values from this iterator.
+ * @param chunkSize The maximum number of values in each array.
+ */
+ chunks(chunkSize: number): IteratorObject;
+
+ /**
+ * Creates a string by concatenating the values of this iterator, separated by the specified separator.
+ * `null` and `undefined` values contribute an empty string.
+ * @param separator A string used to separate values. If omitted, a comma is used.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Determines whether this iterator yields the specified value using SameValueZero comparison.
+ * @param searchElement The value to locate.
+ * @param skippedElements The number of values to skip before searching.
+ */
+ includes(searchElement: T, skippedElements?: number): boolean;
+ }
+
+ interface IteratorConstructor {
+ /**
+ * Creates an iterator whose values are arrays containing values yielded at the same position by each input iterator or iterable.
+ * @param iterables An iterable of iterators or iterables to zip.
+ * @param options Controls how differing input lengths are handled.
+ */
+ zip(iterables: readonly [], options?: IteratorZipOptions>): IteratorObject;
+
+ /**
+ * Creates an iterator whose values are arrays containing values yielded at the same position by each input iterator or iterable.
+ * @param iterables An iterable of iterators or iterables to zip.
+ * @param options Controls how differing input lengths are handled.
+ */
+ zip(iterables: T, options: IteratorZipLongestOptions>> & { padding: NoInfer>; }): IteratorObject, undefined, unknown>;
+ zip[] | []>(iterables: T, options?: IteratorZipShortestOptions | IteratorZipStrictOptions): IteratorObject, undefined, unknown>;
+ zip[] | []>(iterables: T, options: IteratorZipOptions>>>): IteratorObject, undefined, unknown>;
+
+ /**
+ * Creates an iterator whose values are arrays containing values yielded at the same position by each input iterator or iterable.
+ * @param iterables An iterable of iterators or iterables to zip.
+ * @param options Controls how differing input lengths are handled.
+ */
+ zip>(iterables: Iterable, options?: IteratorZipShortestOptions | IteratorZipStrictOptions): IteratorObject[], undefined, unknown>;
+ zip>(iterables: Iterable, options: IteratorZipOptions>>>): IteratorObject<(IteratorYield | undefined)[], undefined, unknown>;
+
+ /**
+ * Creates an iterator whose values are objects containing values yielded at the same position by each iterator or iterable in the input object.
+ * @param iterables An object whose enumerable own properties contain iterators or iterables to zip.
+ * @param options Controls how differing input lengths are handled.
+ */
+ zipKeyed(iterables: T & Record>, options?: IteratorZipShortestOptions | (IteratorZipLongestOptions>> & { padding: NoInfer>; }) | IteratorZipStrictOptions): IteratorObject, undefined, unknown>;
+ zipKeyed(iterables: T & Record>, options: IteratorZipOptions>>>): IteratorObject, undefined, unknown>;
+ }
+}
diff --git a/tsc/internal/bundled/libs_generated.go b/tsc/internal/bundled/libs_generated.go
index 6750307190f5b..49253b24f900c 100644
--- a/tsc/internal/bundled/libs_generated.go
+++ b/tsc/internal/bundled/libs_generated.go
@@ -105,6 +105,7 @@ var LibNames = []string{
"lib.esnext.error.d.ts",
"lib.esnext.full.d.ts",
"lib.esnext.intl.d.ts",
+ "lib.esnext.iterator.d.ts",
"lib.esnext.sharedmemory.d.ts",
"lib.esnext.temporal.d.ts",
"lib.esnext.typedarrays.d.ts",
diff --git a/tsc/internal/compiler/program_test.go b/tsc/internal/compiler/program_test.go
index 0b91d2ce073e0..615aead0b24ff 100644
--- a/tsc/internal/compiler/program_test.go
+++ b/tsc/internal/compiler/program_test.go
@@ -111,6 +111,7 @@ var esnextLibs = []string{
"lib.es2025.iterator.d.ts",
"lib.es2025.promise.d.ts",
"lib.es2025.regexp.d.ts",
+ "lib.esnext.iterator.d.ts",
"lib.esnext.array.d.ts",
"lib.esnext.collection.d.ts",
"lib.esnext.date.d.ts",
diff --git a/tsc/internal/tsoptions/enummaps.go b/tsc/internal/tsoptions/enummaps.go
index 3bf67a8640675..2f2982f270182 100644
--- a/tsc/internal/tsoptions/enummaps.go
+++ b/tsc/internal/tsoptions/enummaps.go
@@ -106,9 +106,9 @@ var LibMap = collections.NewOrderedMapFromList([]collections.MapEntry[string, an
{Key: "esnext.regexp", Value: "lib.es2024.regexp.d.ts"},
{Key: "esnext.string", Value: "lib.es2024.string.d.ts"},
{Key: "esnext.float16", Value: "lib.es2025.float16.d.ts"},
- {Key: "esnext.iterator", Value: "lib.es2025.iterator.d.ts"},
{Key: "esnext.promise", Value: "lib.es2025.promise.d.ts"},
// ESNext By-feature options
+ {Key: "esnext.iterator", Value: "lib.esnext.iterator.d.ts"},
{Key: "esnext.array", Value: "lib.esnext.array.d.ts"},
{Key: "esnext.collection", Value: "lib.esnext.collection.d.ts"},
{Key: "esnext.date", Value: "lib.esnext.date.d.ts"},
diff --git a/tsc/testdata/baselines/reference/compiler/builtinIterator.symbols b/tsc/testdata/baselines/reference/compiler/builtinIterator.symbols
index 8cca78ea45700..d85974669fc57 100644
--- a/tsc/testdata/baselines/reference/compiler/builtinIterator.symbols
+++ b/tsc/testdata/baselines/reference/compiler/builtinIterator.symbols
@@ -184,7 +184,7 @@ const iter1 = Iterator.from(g1);
declare const iter2: IteratorObject;
>iter2 : Symbol(iter2, Decl(builtinIterator.ts, 71, 13))
->IteratorObject : Symbol(IteratorObject, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.disposable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>IteratorObject : Symbol(IteratorObject, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.disposable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --))
const iter3 = iter2.flatMap(() => g1);
>iter3 : Symbol(iter3, Decl(builtinIterator.ts, 72, 5))
diff --git a/tsc/testdata/baselines/reference/compiler/builtinIterator.types b/tsc/testdata/baselines/reference/compiler/builtinIterator.types
index 36094697ac1ef..30a71077c28cf 100644
--- a/tsc/testdata/baselines/reference/compiler/builtinIterator.types
+++ b/tsc/testdata/baselines/reference/compiler/builtinIterator.types
@@ -4,9 +4,9 @@
const iterator = Iterator.from([0, 1, 2]);
>iterator : IteratorObject
>Iterator.from([0, 1, 2]) : IteratorObject
->Iterator.from : (value: Iterator | Iterable) => IteratorObject
+>Iterator.from : (value: Iterable | Iterator) => IteratorObject
>Iterator : IteratorConstructor
->from : (value: Iterator | Iterable) => IteratorObject
+>from : (value: Iterable | Iterator) => IteratorObject
>[0, 1, 2] : number[]
>0 : 0
>1 : 1
@@ -52,9 +52,9 @@ const zero = iterator.filter(isZero);
const iteratorFromBare = Iterator.from({
>iteratorFromBare : IteratorObject
>Iterator.from({ next() { return { done: Math.random() < .5, value: "a string", }; },}) : IteratorObject
->Iterator.from : (value: Iterator | Iterable) => IteratorObject
+>Iterator.from : (value: Iterable | Iterator) => IteratorObject
>Iterator : IteratorConstructor
->from : (value: Iterator | Iterable) => IteratorObject
+>from : (value: Iterable | Iterator) => IteratorObject
>{ next() { return { done: Math.random() < .5, value: "a string", }; },} : { next(): { done: boolean; value: string; }; }
next() {
@@ -244,9 +244,9 @@ declare const g1: Generator;
const iter1 = Iterator.from(g1);
>iter1 : IteratorObject
>Iterator.from(g1) : IteratorObject
->Iterator.from : (value: Iterator | Iterable) => IteratorObject
+>Iterator.from : (value: Iterable | Iterator) => IteratorObject
>Iterator : IteratorConstructor
->from : (value: Iterator | Iterable) => IteratorObject
+>from : (value: Iterable | Iterator) => IteratorObject
>g1 : Generator
declare const iter2: IteratorObject;
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorChunks.errors.txt b/tsc/testdata/baselines/reference/compiler/iteratorChunks.errors.txt
new file mode 100644
index 0000000000000..1058ea5afa59e
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorChunks.errors.txt
@@ -0,0 +1,10 @@
+iteratorChunks.ts(3,33): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
+
+
+==== iteratorChunks.ts (1 errors) ====
+ const chunks: number[][] = Iterator.from([1, 2, 3]).chunks(2).toArray();
+
+ Iterator.from([1, 2, 3]).chunks("2");
+ ~~~
+!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
+
\ No newline at end of file
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorChunks.js b/tsc/testdata/baselines/reference/compiler/iteratorChunks.js
new file mode 100644
index 0000000000000..276d3590cd6e5
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorChunks.js
@@ -0,0 +1,12 @@
+//// [tests/cases/compiler/iteratorChunks.ts] ////
+
+//// [iteratorChunks.ts]
+const chunks: number[][] = Iterator.from([1, 2, 3]).chunks(2).toArray();
+
+Iterator.from([1, 2, 3]).chunks("2");
+
+
+//// [iteratorChunks.js]
+"use strict";
+const chunks = Iterator.from([1, 2, 3]).chunks(2).toArray();
+Iterator.from([1, 2, 3]).chunks("2");
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorChunks.symbols b/tsc/testdata/baselines/reference/compiler/iteratorChunks.symbols
new file mode 100644
index 0000000000000..da7283633fad3
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorChunks.symbols
@@ -0,0 +1,20 @@
+//// [tests/cases/compiler/iteratorChunks.ts] ////
+
+=== iteratorChunks.ts ===
+const chunks: number[][] = Iterator.from([1, 2, 3]).chunks(2).toArray();
+>chunks : Symbol(chunks, Decl(iteratorChunks.ts, 0, 5))
+>Iterator.from([1, 2, 3]).chunks(2).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.from([1, 2, 3]).chunks : Symbol(IteratorObject.chunks, Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator.from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>chunks : Symbol(IteratorObject.chunks, Decl(lib.esnext.iterator.d.ts, --, --))
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+Iterator.from([1, 2, 3]).chunks("2");
+>Iterator.from([1, 2, 3]).chunks : Symbol(IteratorObject.chunks, Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator.from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>chunks : Symbol(IteratorObject.chunks, Decl(lib.esnext.iterator.d.ts, --, --))
+
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorChunks.types b/tsc/testdata/baselines/reference/compiler/iteratorChunks.types
new file mode 100644
index 0000000000000..a70cd739067c4
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorChunks.types
@@ -0,0 +1,35 @@
+//// [tests/cases/compiler/iteratorChunks.ts] ////
+
+=== iteratorChunks.ts ===
+const chunks: number[][] = Iterator.from([1, 2, 3]).chunks(2).toArray();
+>chunks : number[][]
+>Iterator.from([1, 2, 3]).chunks(2).toArray() : number[][]
+>Iterator.from([1, 2, 3]).chunks(2).toArray : () => number[][]
+>Iterator.from([1, 2, 3]).chunks(2) : IteratorObject
+>Iterator.from([1, 2, 3]).chunks : (chunkSize: number) => IteratorObject
+>Iterator.from([1, 2, 3]) : IteratorObject
+>Iterator.from : (value: Iterable | Iterator) => IteratorObject
+>Iterator : IteratorConstructor
+>from : (value: Iterable | Iterator) => IteratorObject
+>[1, 2, 3] : number[]
+>1 : 1
+>2 : 2
+>3 : 3
+>chunks : (chunkSize: number) => IteratorObject
+>2 : 2
+>toArray : () => number[][]
+
+Iterator.from([1, 2, 3]).chunks("2");
+>Iterator.from([1, 2, 3]).chunks("2") : IteratorObject
+>Iterator.from([1, 2, 3]).chunks : (chunkSize: number) => IteratorObject
+>Iterator.from([1, 2, 3]) : IteratorObject
+>Iterator.from : (value: Iterable | Iterator) => IteratorObject
+>Iterator : IteratorConstructor
+>from : (value: Iterable | Iterator) => IteratorObject
+>[1, 2, 3] : number[]
+>1 : 1
+>2 : 2
+>3 : 3
+>chunks : (chunkSize: number) => IteratorObject
+>"2" : "2"
+
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorIncludes.errors.txt b/tsc/testdata/baselines/reference/compiler/iteratorIncludes.errors.txt
new file mode 100644
index 0000000000000..31de09d8bc8e0
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorIncludes.errors.txt
@@ -0,0 +1,16 @@
+iteratorIncludes.ts(4,35): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
+iteratorIncludes.ts(6,38): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
+
+
+==== iteratorIncludes.ts (2 errors) ====
+ const includes: boolean = Iterator.from([1, 2, 3]).includes(2);
+ const includesAfterSkipping: boolean = Iterator.from([1, 2, 3]).includes(2, 1);
+
+ Iterator.from([1, 2, 3]).includes("1");
+ ~~~
+!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
+
+ Iterator.from([1, 2, 3]).includes(2, "1");
+ ~~~
+!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
+
\ No newline at end of file
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorIncludes.js b/tsc/testdata/baselines/reference/compiler/iteratorIncludes.js
new file mode 100644
index 0000000000000..92d42f4785296
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorIncludes.js
@@ -0,0 +1,17 @@
+//// [tests/cases/compiler/iteratorIncludes.ts] ////
+
+//// [iteratorIncludes.ts]
+const includes: boolean = Iterator.from([1, 2, 3]).includes(2);
+const includesAfterSkipping: boolean = Iterator.from([1, 2, 3]).includes(2, 1);
+
+Iterator.from([1, 2, 3]).includes("1");
+
+Iterator.from([1, 2, 3]).includes(2, "1");
+
+
+//// [iteratorIncludes.js]
+"use strict";
+const includes = Iterator.from([1, 2, 3]).includes(2);
+const includesAfterSkipping = Iterator.from([1, 2, 3]).includes(2, 1);
+Iterator.from([1, 2, 3]).includes("1");
+Iterator.from([1, 2, 3]).includes(2, "1");
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorIncludes.symbols b/tsc/testdata/baselines/reference/compiler/iteratorIncludes.symbols
new file mode 100644
index 0000000000000..e1d0affa5aa76
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorIncludes.symbols
@@ -0,0 +1,33 @@
+//// [tests/cases/compiler/iteratorIncludes.ts] ////
+
+=== iteratorIncludes.ts ===
+const includes: boolean = Iterator.from([1, 2, 3]).includes(2);
+>includes : Symbol(includes, Decl(iteratorIncludes.ts, 0, 5))
+>Iterator.from([1, 2, 3]).includes : Symbol(IteratorObject.includes, Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator.from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>includes : Symbol(IteratorObject.includes, Decl(lib.esnext.iterator.d.ts, --, --))
+
+const includesAfterSkipping: boolean = Iterator.from([1, 2, 3]).includes(2, 1);
+>includesAfterSkipping : Symbol(includesAfterSkipping, Decl(iteratorIncludes.ts, 1, 5))
+>Iterator.from([1, 2, 3]).includes : Symbol(IteratorObject.includes, Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator.from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>includes : Symbol(IteratorObject.includes, Decl(lib.esnext.iterator.d.ts, --, --))
+
+Iterator.from([1, 2, 3]).includes("1");
+>Iterator.from([1, 2, 3]).includes : Symbol(IteratorObject.includes, Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator.from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>includes : Symbol(IteratorObject.includes, Decl(lib.esnext.iterator.d.ts, --, --))
+
+Iterator.from([1, 2, 3]).includes(2, "1");
+>Iterator.from([1, 2, 3]).includes : Symbol(IteratorObject.includes, Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator.from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>includes : Symbol(IteratorObject.includes, Decl(lib.esnext.iterator.d.ts, --, --))
+
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorIncludes.types b/tsc/testdata/baselines/reference/compiler/iteratorIncludes.types
new file mode 100644
index 0000000000000..9883553132cea
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorIncludes.types
@@ -0,0 +1,63 @@
+//// [tests/cases/compiler/iteratorIncludes.ts] ////
+
+=== iteratorIncludes.ts ===
+const includes: boolean = Iterator.from([1, 2, 3]).includes(2);
+>includes : boolean
+>Iterator.from([1, 2, 3]).includes(2) : boolean
+>Iterator.from([1, 2, 3]).includes : (searchElement: number, skippedElements?: number) => boolean
+>Iterator.from([1, 2, 3]) : IteratorObject
+>Iterator.from : (value: Iterable | Iterator) => IteratorObject
+>Iterator : IteratorConstructor
+>from : (value: Iterable | Iterator) => IteratorObject
+>[1, 2, 3] : number[]
+>1 : 1
+>2 : 2
+>3 : 3
+>includes : (searchElement: number, skippedElements?: number) => boolean
+>2 : 2
+
+const includesAfterSkipping: boolean = Iterator.from([1, 2, 3]).includes(2, 1);
+>includesAfterSkipping : boolean
+>Iterator.from([1, 2, 3]).includes(2, 1) : boolean
+>Iterator.from([1, 2, 3]).includes : (searchElement: number, skippedElements?: number) => boolean
+>Iterator.from([1, 2, 3]) : IteratorObject
+>Iterator.from : (value: Iterable | Iterator) => IteratorObject
+>Iterator : IteratorConstructor
+>from : (value: Iterable | Iterator) => IteratorObject
+>[1, 2, 3] : number[]
+>1 : 1
+>2 : 2
+>3 : 3
+>includes : (searchElement: number, skippedElements?: number) => boolean
+>2 : 2
+>1 : 1
+
+Iterator.from([1, 2, 3]).includes("1");
+>Iterator.from([1, 2, 3]).includes("1") : boolean
+>Iterator.from([1, 2, 3]).includes : (searchElement: number, skippedElements?: number) => boolean
+>Iterator.from([1, 2, 3]) : IteratorObject
+>Iterator.from : (value: Iterable | Iterator) => IteratorObject
+>Iterator : IteratorConstructor
+>from : (value: Iterable | Iterator) => IteratorObject
+>[1, 2, 3] : number[]
+>1 : 1
+>2 : 2
+>3 : 3
+>includes : (searchElement: number, skippedElements?: number) => boolean
+>"1" : "1"
+
+Iterator.from([1, 2, 3]).includes(2, "1");
+>Iterator.from([1, 2, 3]).includes(2, "1") : boolean
+>Iterator.from([1, 2, 3]).includes : (searchElement: number, skippedElements?: number) => boolean
+>Iterator.from([1, 2, 3]) : IteratorObject
+>Iterator.from : (value: Iterable | Iterator) => IteratorObject
+>Iterator : IteratorConstructor
+>from : (value: Iterable | Iterator) => IteratorObject
+>[1, 2, 3] : number[]
+>1 : 1
+>2 : 2
+>3 : 3
+>includes : (searchElement: number, skippedElements?: number) => boolean
+>2 : 2
+>"1" : "1"
+
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorJoin.errors.txt b/tsc/testdata/baselines/reference/compiler/iteratorJoin.errors.txt
new file mode 100644
index 0000000000000..b0f965b138061
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorJoin.errors.txt
@@ -0,0 +1,11 @@
+iteratorJoin.ts(4,31): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
+
+
+==== iteratorJoin.ts (1 errors) ====
+ const joined: string = Iterator.from([1, 2, 3]).join("-");
+ const joinedWithDefaultSeparator: string = Iterator.from([1, 2, 3]).join();
+
+ Iterator.from([1, 2, 3]).join(0);
+ ~
+!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
+
\ No newline at end of file
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorJoin.js b/tsc/testdata/baselines/reference/compiler/iteratorJoin.js
new file mode 100644
index 0000000000000..128b43c5b193d
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorJoin.js
@@ -0,0 +1,14 @@
+//// [tests/cases/compiler/iteratorJoin.ts] ////
+
+//// [iteratorJoin.ts]
+const joined: string = Iterator.from([1, 2, 3]).join("-");
+const joinedWithDefaultSeparator: string = Iterator.from([1, 2, 3]).join();
+
+Iterator.from([1, 2, 3]).join(0);
+
+
+//// [iteratorJoin.js]
+"use strict";
+const joined = Iterator.from([1, 2, 3]).join("-");
+const joinedWithDefaultSeparator = Iterator.from([1, 2, 3]).join();
+Iterator.from([1, 2, 3]).join(0);
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorJoin.symbols b/tsc/testdata/baselines/reference/compiler/iteratorJoin.symbols
new file mode 100644
index 0000000000000..94c7ac9cbd5c1
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorJoin.symbols
@@ -0,0 +1,26 @@
+//// [tests/cases/compiler/iteratorJoin.ts] ////
+
+=== iteratorJoin.ts ===
+const joined: string = Iterator.from([1, 2, 3]).join("-");
+>joined : Symbol(joined, Decl(iteratorJoin.ts, 0, 5))
+>Iterator.from([1, 2, 3]).join : Symbol(IteratorObject.join, Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator.from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>join : Symbol(IteratorObject.join, Decl(lib.esnext.iterator.d.ts, --, --))
+
+const joinedWithDefaultSeparator: string = Iterator.from([1, 2, 3]).join();
+>joinedWithDefaultSeparator : Symbol(joinedWithDefaultSeparator, Decl(iteratorJoin.ts, 1, 5))
+>Iterator.from([1, 2, 3]).join : Symbol(IteratorObject.join, Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator.from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>join : Symbol(IteratorObject.join, Decl(lib.esnext.iterator.d.ts, --, --))
+
+Iterator.from([1, 2, 3]).join(0);
+>Iterator.from([1, 2, 3]).join : Symbol(IteratorObject.join, Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator.from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>from : Symbol(IteratorConstructor.from, Decl(lib.es2025.iterator.d.ts, --, --))
+>join : Symbol(IteratorObject.join, Decl(lib.esnext.iterator.d.ts, --, --))
+
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorJoin.types b/tsc/testdata/baselines/reference/compiler/iteratorJoin.types
new file mode 100644
index 0000000000000..cad93dd3c8210
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorJoin.types
@@ -0,0 +1,46 @@
+//// [tests/cases/compiler/iteratorJoin.ts] ////
+
+=== iteratorJoin.ts ===
+const joined: string = Iterator.from([1, 2, 3]).join("-");
+>joined : string
+>Iterator.from([1, 2, 3]).join("-") : string
+>Iterator.from([1, 2, 3]).join : (separator?: string) => string
+>Iterator.from([1, 2, 3]) : IteratorObject
+>Iterator.from : (value: Iterable | Iterator) => IteratorObject
+>Iterator : IteratorConstructor
+>from : (value: Iterable | Iterator) => IteratorObject
+>[1, 2, 3] : number[]
+>1 : 1
+>2 : 2
+>3 : 3
+>join : (separator?: string) => string
+>"-" : "-"
+
+const joinedWithDefaultSeparator: string = Iterator.from([1, 2, 3]).join();
+>joinedWithDefaultSeparator : string
+>Iterator.from([1, 2, 3]).join() : string
+>Iterator.from([1, 2, 3]).join : (separator?: string) => string
+>Iterator.from([1, 2, 3]) : IteratorObject
+>Iterator.from : (value: Iterable | Iterator) => IteratorObject
+>Iterator : IteratorConstructor
+>from : (value: Iterable | Iterator) => IteratorObject
+>[1, 2, 3] : number[]
+>1 : 1
+>2 : 2
+>3 : 3
+>join : (separator?: string) => string
+
+Iterator.from([1, 2, 3]).join(0);
+>Iterator.from([1, 2, 3]).join(0) : string
+>Iterator.from([1, 2, 3]).join : (separator?: string) => string
+>Iterator.from([1, 2, 3]) : IteratorObject
+>Iterator.from : (value: Iterable | Iterator) => IteratorObject
+>Iterator : IteratorConstructor
+>from : (value: Iterable | Iterator) => IteratorObject
+>[1, 2, 3] : number[]
+>1 : 1
+>2 : 2
+>3 : 3
+>join : (separator?: string) => string
+>0 : 0
+
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorZip.errors.txt b/tsc/testdata/baselines/reference/compiler/iteratorZip.errors.txt
new file mode 100644
index 0000000000000..a0d14c8d721a6
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorZip.errors.txt
@@ -0,0 +1,120 @@
+iteratorZip.ts(62,23): error TS2769: No overload matches this call.
+ The last overload gave the following error.
+ Type '"invalid"' is not assignable to type '"longest" | "shortest" | "strict" | undefined'.
+iteratorZip.ts(64,56): error TS2769: No overload matches this call.
+ The last overload gave the following error.
+ Type 'true[]' is not assignable to type 'Iterable<"a" | 1>'.
+ The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
+ Type 'IteratorResult' is not assignable to type 'IteratorResult<"a" | 1, any>'.
+ Type 'IteratorYieldResult' is not assignable to type 'IteratorResult<"a" | 1, any>'.
+ Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult<"a" | 1>'.
+ Type 'true' is not assignable to type '"a" | 1'.
+iteratorZip.ts(66,41): error TS2769: No overload matches this call.
+ The last overload gave the following error.
+ Object literal may only specify known properties, and 'padding' does not exist in type 'IteratorZipShortestOptions'.
+iteratorZip.ts(68,14): error TS2769: No overload matches this call.
+ The last overload gave the following error.
+ Argument of type 'number' is not assignable to parameter of type 'Iterable>'.
+iteratorZip.ts(70,21): error TS2322: Type 'number' is not assignable to type 'number & IteratorInput'.
+
+
+==== iteratorZip.ts (5 errors) ====
+ declare const key: unique symbol;
+
+ const tuples: [number, string][] = Iterator.zip([
+ [1, 2],
+ new Set(["a", "b"]),
+ ] as const).toArray();
+
+ tuples[0][0] = 2;
+
+ const shortestTuples: [number, string][] = Iterator.zip([[1], ["a"]] as const, { mode: "shortest" }).toArray();
+ const strictTuples: [number, string][] = Iterator.zip([[1], ["a"]] as const, { mode: "strict" }).toArray();
+ const longestTuplesWithPadding: [number, string][] = Iterator.zip([[1], ["a"]] as const, { mode: "longest", padding: [1, "a"] }).toArray();
+ const longestTuplesWithoutPadding: [number | undefined, string | undefined][] = Iterator.zip([[1], ["a"]] as const, { mode: "longest" }).toArray();
+ const longestTuplesWithPartialPadding: [number | undefined, string | undefined][] = Iterator.zip([[1], ["a"]] as const, { mode: "longest", padding: [1] }).toArray();
+
+ declare const maybeLongestOptions: { mode: "shortest"; } | { mode: "longest"; };
+ const maybeLongestTuples: [number | undefined, string | undefined][] = Iterator.zip([[1], ["a"]] as const, maybeLongestOptions).toArray();
+
+ const empty: never[] = Iterator.zip([]).toArray();
+ const emptyLongest: never[] = Iterator.zip([], { mode: "longest" }).toArray();
+
+ declare const iterables: Iterable>;
+ const arrays: number[][] = Iterator.zip(iterables).toArray();
+ const longestArrays: (number | undefined)[][] = Iterator.zip(iterables, { mode: "longest" }).toArray();
+ const maybeLongestArrays: (number | undefined)[][] = Iterator.zip(iterables, maybeLongestOptions).toArray();
+
+ declare const iterableArray: Iterable[];
+ const longestArrayWithPadding: (number | undefined)[][] = Iterator.zip(iterableArray, { mode: "longest", padding: [] }).toArray();
+
+ const objects: { a: number; b: string; [key]: boolean; }[] = Iterator.zipKeyed({
+ a: [1, 2],
+ b: new Set(["a", "b"]),
+ [key]: [true, false],
+ } as const).toArray();
+
+ objects[0].a = 2;
+
+ const longestObjectsWithPadding: { a: number; b: string; }[] = Iterator.zipKeyed({ a: [1], b: ["a"] } as const, {
+ mode: "longest",
+ padding: { a: 1, b: "a" },
+ }).toArray();
+
+ const longestObjectsWithoutPadding: { a: number | undefined; b: string | undefined; }[] = Iterator.zipKeyed({ a: [1], b: ["a"] } as const, {
+ mode: "longest",
+ }).toArray();
+
+ const longestObjectsWithPartialPadding: { a: number | undefined; b: string | undefined; }[] = Iterator.zipKeyed({ a: [1], b: ["a"] } as const, {
+ mode: "longest",
+ padding: { b: "a" },
+ }).toArray();
+
+ const maybeLongestObjects: { a: number | undefined; b: string | undefined; }[] = Iterator.zipKeyed({ a: [1], b: ["a"] } as const, maybeLongestOptions).toArray();
+
+ interface Inputs {
+ a: Iterable;
+ b: Iterator;
+ }
+
+ declare const inputs: Inputs;
+ const rows: { a: number; b: string; }[] = Iterator.zipKeyed(inputs).toArray();
+
+ Iterator.zip([[1]], { mode: "invalid" });
+ ~~~~
+!!! error TS2769: No overload matches this call.
+!!! error TS2769: The last overload gave the following error.
+!!! error TS2769: Type '"invalid"' is not assignable to type '"longest" | "shortest" | "strict" | undefined'.
+!!! related TS2771 lib.esnext.iterator.d.ts:--:--: The last overload is declared here.
+
+ Iterator.zip([[1], ["a"]] as const, { mode: "longest", padding: [true] });
+ ~~~~~~~
+!!! error TS2769: No overload matches this call.
+!!! error TS2769: The last overload gave the following error.
+!!! error TS2769: Type 'true[]' is not assignable to type 'Iterable<"a" | 1>'.
+!!! error TS2769: The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
+!!! error TS2769: Type 'IteratorResult' is not assignable to type 'IteratorResult<"a" | 1, any>'.
+!!! error TS2769: Type 'IteratorYieldResult' is not assignable to type 'IteratorResult<"a" | 1, any>'.
+!!! error TS2769: Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult<"a" | 1>'.
+!!! error TS2769: Type 'true' is not assignable to type '"a" | 1'.
+!!! related TS2771 lib.esnext.iterator.d.ts:--:--: The last overload is declared here.
+
+ Iterator.zip([[1]], { mode: "shortest", padding: [1] });
+ ~~~~~~~
+!!! error TS2769: No overload matches this call.
+!!! error TS2769: The last overload gave the following error.
+!!! error TS2769: Object literal may only specify known properties, and 'padding' does not exist in type 'IteratorZipShortestOptions'.
+!!! related TS2771 lib.esnext.iterator.d.ts:--:--: The last overload is declared here.
+
+ Iterator.zip(0);
+ ~
+!!! error TS2769: No overload matches this call.
+!!! error TS2769: The last overload gave the following error.
+!!! error TS2769: Argument of type 'number' is not assignable to parameter of type 'Iterable>'.
+!!! related TS2771 lib.esnext.iterator.d.ts:--:--: The last overload is declared here.
+
+ Iterator.zipKeyed({ a: 0 });
+ ~
+!!! error TS2322: Type 'number' is not assignable to type 'number & IteratorInput'.
+!!! related TS6500 iteratorZip.ts:70:21: The expected type comes from property 'a' which is declared here on type '{ a: number; } & Record<"a", IteratorInput>'
+
\ No newline at end of file
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorZip.js b/tsc/testdata/baselines/reference/compiler/iteratorZip.js
new file mode 100644
index 0000000000000..ea5e813d79631
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorZip.js
@@ -0,0 +1,118 @@
+//// [tests/cases/compiler/iteratorZip.ts] ////
+
+//// [iteratorZip.ts]
+declare const key: unique symbol;
+
+const tuples: [number, string][] = Iterator.zip([
+ [1, 2],
+ new Set(["a", "b"]),
+] as const).toArray();
+
+tuples[0][0] = 2;
+
+const shortestTuples: [number, string][] = Iterator.zip([[1], ["a"]] as const, { mode: "shortest" }).toArray();
+const strictTuples: [number, string][] = Iterator.zip([[1], ["a"]] as const, { mode: "strict" }).toArray();
+const longestTuplesWithPadding: [number, string][] = Iterator.zip([[1], ["a"]] as const, { mode: "longest", padding: [1, "a"] }).toArray();
+const longestTuplesWithoutPadding: [number | undefined, string | undefined][] = Iterator.zip([[1], ["a"]] as const, { mode: "longest" }).toArray();
+const longestTuplesWithPartialPadding: [number | undefined, string | undefined][] = Iterator.zip([[1], ["a"]] as const, { mode: "longest", padding: [1] }).toArray();
+
+declare const maybeLongestOptions: { mode: "shortest"; } | { mode: "longest"; };
+const maybeLongestTuples: [number | undefined, string | undefined][] = Iterator.zip([[1], ["a"]] as const, maybeLongestOptions).toArray();
+
+const empty: never[] = Iterator.zip([]).toArray();
+const emptyLongest: never[] = Iterator.zip([], { mode: "longest" }).toArray();
+
+declare const iterables: Iterable>;
+const arrays: number[][] = Iterator.zip(iterables).toArray();
+const longestArrays: (number | undefined)[][] = Iterator.zip(iterables, { mode: "longest" }).toArray();
+const maybeLongestArrays: (number | undefined)[][] = Iterator.zip(iterables, maybeLongestOptions).toArray();
+
+declare const iterableArray: Iterable[];
+const longestArrayWithPadding: (number | undefined)[][] = Iterator.zip(iterableArray, { mode: "longest", padding: [] }).toArray();
+
+const objects: { a: number; b: string; [key]: boolean; }[] = Iterator.zipKeyed({
+ a: [1, 2],
+ b: new Set(["a", "b"]),
+ [key]: [true, false],
+} as const).toArray();
+
+objects[0].a = 2;
+
+const longestObjectsWithPadding: { a: number; b: string; }[] = Iterator.zipKeyed({ a: [1], b: ["a"] } as const, {
+ mode: "longest",
+ padding: { a: 1, b: "a" },
+}).toArray();
+
+const longestObjectsWithoutPadding: { a: number | undefined; b: string | undefined; }[] = Iterator.zipKeyed({ a: [1], b: ["a"] } as const, {
+ mode: "longest",
+}).toArray();
+
+const longestObjectsWithPartialPadding: { a: number | undefined; b: string | undefined; }[] = Iterator.zipKeyed({ a: [1], b: ["a"] } as const, {
+ mode: "longest",
+ padding: { b: "a" },
+}).toArray();
+
+const maybeLongestObjects: { a: number | undefined; b: string | undefined; }[] = Iterator.zipKeyed({ a: [1], b: ["a"] } as const, maybeLongestOptions).toArray();
+
+interface Inputs {
+ a: Iterable;
+ b: Iterator;
+}
+
+declare const inputs: Inputs;
+const rows: { a: number; b: string; }[] = Iterator.zipKeyed(inputs).toArray();
+
+Iterator.zip([[1]], { mode: "invalid" });
+
+Iterator.zip([[1], ["a"]] as const, { mode: "longest", padding: [true] });
+
+Iterator.zip([[1]], { mode: "shortest", padding: [1] });
+
+Iterator.zip(0);
+
+Iterator.zipKeyed({ a: 0 });
+
+
+//// [iteratorZip.js]
+"use strict";
+const tuples = Iterator.zip([
+ [1, 2],
+ new Set(["a", "b"]),
+]).toArray();
+tuples[0][0] = 2;
+const shortestTuples = Iterator.zip([[1], ["a"]], { mode: "shortest" }).toArray();
+const strictTuples = Iterator.zip([[1], ["a"]], { mode: "strict" }).toArray();
+const longestTuplesWithPadding = Iterator.zip([[1], ["a"]], { mode: "longest", padding: [1, "a"] }).toArray();
+const longestTuplesWithoutPadding = Iterator.zip([[1], ["a"]], { mode: "longest" }).toArray();
+const longestTuplesWithPartialPadding = Iterator.zip([[1], ["a"]], { mode: "longest", padding: [1] }).toArray();
+const maybeLongestTuples = Iterator.zip([[1], ["a"]], maybeLongestOptions).toArray();
+const empty = Iterator.zip([]).toArray();
+const emptyLongest = Iterator.zip([], { mode: "longest" }).toArray();
+const arrays = Iterator.zip(iterables).toArray();
+const longestArrays = Iterator.zip(iterables, { mode: "longest" }).toArray();
+const maybeLongestArrays = Iterator.zip(iterables, maybeLongestOptions).toArray();
+const longestArrayWithPadding = Iterator.zip(iterableArray, { mode: "longest", padding: [] }).toArray();
+const objects = Iterator.zipKeyed({
+ a: [1, 2],
+ b: new Set(["a", "b"]),
+ [key]: [true, false],
+}).toArray();
+objects[0].a = 2;
+const longestObjectsWithPadding = Iterator.zipKeyed({ a: [1], b: ["a"] }, {
+ mode: "longest",
+ padding: { a: 1, b: "a" },
+}).toArray();
+const longestObjectsWithoutPadding = Iterator.zipKeyed({ a: [1], b: ["a"] }, {
+ mode: "longest",
+}).toArray();
+const longestObjectsWithPartialPadding = Iterator.zipKeyed({ a: [1], b: ["a"] }, {
+ mode: "longest",
+ padding: { b: "a" },
+}).toArray();
+const maybeLongestObjects = Iterator.zipKeyed({ a: [1], b: ["a"] }, maybeLongestOptions).toArray();
+const rows = Iterator.zipKeyed(inputs).toArray();
+Iterator.zip([[1]], { mode: "invalid" });
+Iterator.zip([[1], ["a"]], { mode: "longest", padding: [true] });
+Iterator.zip([[1]], { mode: "shortest", padding: [1] });
+Iterator.zip(0);
+Iterator.zipKeyed({ a: 0 });
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorZip.symbols b/tsc/testdata/baselines/reference/compiler/iteratorZip.symbols
new file mode 100644
index 0000000000000..c427139883826
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorZip.symbols
@@ -0,0 +1,325 @@
+//// [tests/cases/compiler/iteratorZip.ts] ////
+
+=== iteratorZip.ts ===
+declare const key: unique symbol;
+>key : Symbol(key, Decl(iteratorZip.ts, 0, 13))
+
+const tuples: [number, string][] = Iterator.zip([
+>tuples : Symbol(tuples, Decl(iteratorZip.ts, 2, 5))
+>Iterator.zip([ [1, 2], new Set(["a", "b"]),] as const).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+
+ [1, 2],
+ new Set(["a", "b"]),
+>Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+
+] as const).toArray();
+>const : Symbol(const)
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+tuples[0][0] = 2;
+>tuples : Symbol(tuples, Decl(iteratorZip.ts, 2, 5))
+>0 : Symbol(0)
+
+const shortestTuples: [number, string][] = Iterator.zip([[1], ["a"]] as const, { mode: "shortest" }).toArray();
+>shortestTuples : Symbol(shortestTuples, Decl(iteratorZip.ts, 9, 5))
+>Iterator.zip([[1], ["a"]] as const, { mode: "shortest" }).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>const : Symbol(const)
+>mode : Symbol(mode, Decl(iteratorZip.ts, 9, 80))
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+const strictTuples: [number, string][] = Iterator.zip([[1], ["a"]] as const, { mode: "strict" }).toArray();
+>strictTuples : Symbol(strictTuples, Decl(iteratorZip.ts, 10, 5))
+>Iterator.zip([[1], ["a"]] as const, { mode: "strict" }).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>const : Symbol(const)
+>mode : Symbol(mode, Decl(iteratorZip.ts, 10, 78))
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+const longestTuplesWithPadding: [number, string][] = Iterator.zip([[1], ["a"]] as const, { mode: "longest", padding: [1, "a"] }).toArray();
+>longestTuplesWithPadding : Symbol(longestTuplesWithPadding, Decl(iteratorZip.ts, 11, 5))
+>Iterator.zip([[1], ["a"]] as const, { mode: "longest", padding: [1, "a"] }).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>const : Symbol(const)
+>mode : Symbol(mode, Decl(iteratorZip.ts, 11, 90))
+>padding : Symbol(padding, Decl(iteratorZip.ts, 11, 107))
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+const longestTuplesWithoutPadding: [number | undefined, string | undefined][] = Iterator.zip([[1], ["a"]] as const, { mode: "longest" }).toArray();
+>longestTuplesWithoutPadding : Symbol(longestTuplesWithoutPadding, Decl(iteratorZip.ts, 12, 5))
+>Iterator.zip([[1], ["a"]] as const, { mode: "longest" }).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>const : Symbol(const)
+>mode : Symbol(mode, Decl(iteratorZip.ts, 12, 117))
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+const longestTuplesWithPartialPadding: [number | undefined, string | undefined][] = Iterator.zip([[1], ["a"]] as const, { mode: "longest", padding: [1] }).toArray();
+>longestTuplesWithPartialPadding : Symbol(longestTuplesWithPartialPadding, Decl(iteratorZip.ts, 13, 5))
+>Iterator.zip([[1], ["a"]] as const, { mode: "longest", padding: [1] }).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>const : Symbol(const)
+>mode : Symbol(mode, Decl(iteratorZip.ts, 13, 121))
+>padding : Symbol(padding, Decl(iteratorZip.ts, 13, 138))
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+declare const maybeLongestOptions: { mode: "shortest"; } | { mode: "longest"; };
+>maybeLongestOptions : Symbol(maybeLongestOptions, Decl(iteratorZip.ts, 15, 13))
+>mode : Symbol(mode, Decl(iteratorZip.ts, 15, 36))
+>mode : Symbol(mode, Decl(iteratorZip.ts, 15, 60))
+
+const maybeLongestTuples: [number | undefined, string | undefined][] = Iterator.zip([[1], ["a"]] as const, maybeLongestOptions).toArray();
+>maybeLongestTuples : Symbol(maybeLongestTuples, Decl(iteratorZip.ts, 16, 5))
+>Iterator.zip([[1], ["a"]] as const, maybeLongestOptions).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>const : Symbol(const)
+>maybeLongestOptions : Symbol(maybeLongestOptions, Decl(iteratorZip.ts, 15, 13))
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+const empty: never[] = Iterator.zip([]).toArray();
+>empty : Symbol(empty, Decl(iteratorZip.ts, 18, 5))
+>Iterator.zip([]).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+const emptyLongest: never[] = Iterator.zip([], { mode: "longest" }).toArray();
+>emptyLongest : Symbol(emptyLongest, Decl(iteratorZip.ts, 19, 5))
+>Iterator.zip([], { mode: "longest" }).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>mode : Symbol(mode, Decl(iteratorZip.ts, 19, 48))
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+declare const iterables: Iterable>;
+>iterables : Symbol(iterables, Decl(iteratorZip.ts, 21, 13))
+>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
+>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
+
+const arrays: number[][] = Iterator.zip(iterables).toArray();
+>arrays : Symbol(arrays, Decl(iteratorZip.ts, 22, 5))
+>Iterator.zip(iterables).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>iterables : Symbol(iterables, Decl(iteratorZip.ts, 21, 13))
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+const longestArrays: (number | undefined)[][] = Iterator.zip(iterables, { mode: "longest" }).toArray();
+>longestArrays : Symbol(longestArrays, Decl(iteratorZip.ts, 23, 5))
+>Iterator.zip(iterables, { mode: "longest" }).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>iterables : Symbol(iterables, Decl(iteratorZip.ts, 21, 13))
+>mode : Symbol(mode, Decl(iteratorZip.ts, 23, 73))
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+const maybeLongestArrays: (number | undefined)[][] = Iterator.zip(iterables, maybeLongestOptions).toArray();
+>maybeLongestArrays : Symbol(maybeLongestArrays, Decl(iteratorZip.ts, 24, 5))
+>Iterator.zip(iterables, maybeLongestOptions).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>iterables : Symbol(iterables, Decl(iteratorZip.ts, 21, 13))
+>maybeLongestOptions : Symbol(maybeLongestOptions, Decl(iteratorZip.ts, 15, 13))
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+declare const iterableArray: Iterable[];
+>iterableArray : Symbol(iterableArray, Decl(iteratorZip.ts, 26, 13))
+>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
+
+const longestArrayWithPadding: (number | undefined)[][] = Iterator.zip(iterableArray, { mode: "longest", padding: [] }).toArray();
+>longestArrayWithPadding : Symbol(longestArrayWithPadding, Decl(iteratorZip.ts, 27, 5))
+>Iterator.zip(iterableArray, { mode: "longest", padding: [] }).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>iterableArray : Symbol(iterableArray, Decl(iteratorZip.ts, 26, 13))
+>mode : Symbol(mode, Decl(iteratorZip.ts, 27, 87))
+>padding : Symbol(padding, Decl(iteratorZip.ts, 27, 104))
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+const objects: { a: number; b: string; [key]: boolean; }[] = Iterator.zipKeyed({
+>objects : Symbol(objects, Decl(iteratorZip.ts, 29, 5))
+>a : Symbol(a, Decl(iteratorZip.ts, 29, 16))
+>b : Symbol(b, Decl(iteratorZip.ts, 29, 27))
+>[key] : Symbol([key], Decl(iteratorZip.ts, 29, 38))
+>key : Symbol(key, Decl(iteratorZip.ts, 0, 13))
+>Iterator.zipKeyed({ a: [1, 2], b: new Set(["a", "b"]), [key]: [true, false],} as const).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zipKeyed : Symbol(IteratorConstructor.zipKeyed, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zipKeyed : Symbol(IteratorConstructor.zipKeyed, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --))
+
+ a: [1, 2],
+>a : Symbol(a, Decl(iteratorZip.ts, 29, 80))
+
+ b: new Set(["a", "b"]),
+>b : Symbol(b, Decl(iteratorZip.ts, 30, 14))
+>Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+
+ [key]: [true, false],
+>[key] : Symbol([key], Decl(iteratorZip.ts, 31, 27))
+>key : Symbol(key, Decl(iteratorZip.ts, 0, 13))
+
+} as const).toArray();
+>const : Symbol(const)
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+objects[0].a = 2;
+>objects[0].a : Symbol(a, Decl(iteratorZip.ts, 29, 16))
+>objects : Symbol(objects, Decl(iteratorZip.ts, 29, 5))
+>a : Symbol(a, Decl(iteratorZip.ts, 29, 16))
+
+const longestObjectsWithPadding: { a: number; b: string; }[] = Iterator.zipKeyed({ a: [1], b: ["a"] } as const, {
+>longestObjectsWithPadding : Symbol(longestObjectsWithPadding, Decl(iteratorZip.ts, 37, 5))
+>a : Symbol(a, Decl(iteratorZip.ts, 37, 34))
+>b : Symbol(b, Decl(iteratorZip.ts, 37, 45))
+>Iterator.zipKeyed({ a: [1], b: ["a"] } as const, { mode: "longest", padding: { a: 1, b: "a" },}).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zipKeyed : Symbol(IteratorConstructor.zipKeyed, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zipKeyed : Symbol(IteratorConstructor.zipKeyed, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --))
+>a : Symbol(a, Decl(iteratorZip.ts, 37, 82))
+>b : Symbol(b, Decl(iteratorZip.ts, 37, 90))
+>const : Symbol(const)
+
+ mode: "longest",
+>mode : Symbol(mode, Decl(iteratorZip.ts, 37, 113))
+
+ padding: { a: 1, b: "a" },
+>padding : Symbol(padding, Decl(iteratorZip.ts, 38, 20))
+>a : Symbol(a, Decl(iteratorZip.ts, 39, 14))
+>b : Symbol(b, Decl(iteratorZip.ts, 39, 20))
+
+}).toArray();
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+const longestObjectsWithoutPadding: { a: number | undefined; b: string | undefined; }[] = Iterator.zipKeyed({ a: [1], b: ["a"] } as const, {
+>longestObjectsWithoutPadding : Symbol(longestObjectsWithoutPadding, Decl(iteratorZip.ts, 42, 5))
+>a : Symbol(a, Decl(iteratorZip.ts, 42, 37))
+>b : Symbol(b, Decl(iteratorZip.ts, 42, 60))
+>Iterator.zipKeyed({ a: [1], b: ["a"] } as const, { mode: "longest",}).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zipKeyed : Symbol(IteratorConstructor.zipKeyed, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zipKeyed : Symbol(IteratorConstructor.zipKeyed, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --))
+>a : Symbol(a, Decl(iteratorZip.ts, 42, 109))
+>b : Symbol(b, Decl(iteratorZip.ts, 42, 117))
+>const : Symbol(const)
+
+ mode: "longest",
+>mode : Symbol(mode, Decl(iteratorZip.ts, 42, 140))
+
+}).toArray();
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+const longestObjectsWithPartialPadding: { a: number | undefined; b: string | undefined; }[] = Iterator.zipKeyed({ a: [1], b: ["a"] } as const, {
+>longestObjectsWithPartialPadding : Symbol(longestObjectsWithPartialPadding, Decl(iteratorZip.ts, 46, 5))
+>a : Symbol(a, Decl(iteratorZip.ts, 46, 41))
+>b : Symbol(b, Decl(iteratorZip.ts, 46, 64))
+>Iterator.zipKeyed({ a: [1], b: ["a"] } as const, { mode: "longest", padding: { b: "a" },}).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zipKeyed : Symbol(IteratorConstructor.zipKeyed, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zipKeyed : Symbol(IteratorConstructor.zipKeyed, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --))
+>a : Symbol(a, Decl(iteratorZip.ts, 46, 113))
+>b : Symbol(b, Decl(iteratorZip.ts, 46, 121))
+>const : Symbol(const)
+
+ mode: "longest",
+>mode : Symbol(mode, Decl(iteratorZip.ts, 46, 144))
+
+ padding: { b: "a" },
+>padding : Symbol(padding, Decl(iteratorZip.ts, 47, 20))
+>b : Symbol(b, Decl(iteratorZip.ts, 48, 14))
+
+}).toArray();
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+const maybeLongestObjects: { a: number | undefined; b: string | undefined; }[] = Iterator.zipKeyed({ a: [1], b: ["a"] } as const, maybeLongestOptions).toArray();
+>maybeLongestObjects : Symbol(maybeLongestObjects, Decl(iteratorZip.ts, 51, 5))
+>a : Symbol(a, Decl(iteratorZip.ts, 51, 28))
+>b : Symbol(b, Decl(iteratorZip.ts, 51, 51))
+>Iterator.zipKeyed({ a: [1], b: ["a"] } as const, maybeLongestOptions).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zipKeyed : Symbol(IteratorConstructor.zipKeyed, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zipKeyed : Symbol(IteratorConstructor.zipKeyed, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --))
+>a : Symbol(a, Decl(iteratorZip.ts, 51, 100))
+>b : Symbol(b, Decl(iteratorZip.ts, 51, 108))
+>const : Symbol(const)
+>maybeLongestOptions : Symbol(maybeLongestOptions, Decl(iteratorZip.ts, 15, 13))
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+interface Inputs {
+>Inputs : Symbol(Inputs, Decl(iteratorZip.ts, 51, 161))
+
+ a: Iterable;
+>a : Symbol(Inputs.a, Decl(iteratorZip.ts, 53, 18))
+>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
+
+ b: Iterator;
+>b : Symbol(Inputs.b, Decl(iteratorZip.ts, 54, 24))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+}
+
+declare const inputs: Inputs;
+>inputs : Symbol(inputs, Decl(iteratorZip.ts, 58, 13))
+>Inputs : Symbol(Inputs, Decl(iteratorZip.ts, 51, 161))
+
+const rows: { a: number; b: string; }[] = Iterator.zipKeyed(inputs).toArray();
+>rows : Symbol(rows, Decl(iteratorZip.ts, 59, 5))
+>a : Symbol(a, Decl(iteratorZip.ts, 59, 13))
+>b : Symbol(b, Decl(iteratorZip.ts, 59, 24))
+>Iterator.zipKeyed(inputs).toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+>Iterator.zipKeyed : Symbol(IteratorConstructor.zipKeyed, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zipKeyed : Symbol(IteratorConstructor.zipKeyed, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --))
+>inputs : Symbol(inputs, Decl(iteratorZip.ts, 58, 13))
+>toArray : Symbol(IteratorObject.toArray, Decl(lib.es2025.iterator.d.ts, --, --))
+
+Iterator.zip([[1]], { mode: "invalid" });
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>mode : Symbol(mode, Decl(iteratorZip.ts, 61, 21))
+
+Iterator.zip([[1], ["a"]] as const, { mode: "longest", padding: [true] });
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>const : Symbol(const)
+>mode : Symbol(mode, Decl(iteratorZip.ts, 63, 37))
+>padding : Symbol(padding, Decl(iteratorZip.ts, 63, 54))
+
+Iterator.zip([[1]], { mode: "shortest", padding: [1] });
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>mode : Symbol(mode, Decl(iteratorZip.ts, 65, 21))
+>padding : Symbol(padding, Decl(iteratorZip.ts, 65, 39))
+
+Iterator.zip(0);
+>Iterator.zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zip : Symbol(IteratorConstructor.zip, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --) ... and 1 more)
+
+Iterator.zipKeyed({ a: 0 });
+>Iterator.zipKeyed : Symbol(IteratorConstructor.zipKeyed, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --))
+>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2025.iterator.d.ts, --, --))
+>zipKeyed : Symbol(IteratorConstructor.zipKeyed, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --))
+>a : Symbol(a, Decl(iteratorZip.ts, 69, 19))
+
diff --git a/tsc/testdata/baselines/reference/compiler/iteratorZip.types b/tsc/testdata/baselines/reference/compiler/iteratorZip.types
new file mode 100644
index 0000000000000..3b6109820c9b3
--- /dev/null
+++ b/tsc/testdata/baselines/reference/compiler/iteratorZip.types
@@ -0,0 +1,498 @@
+//// [tests/cases/compiler/iteratorZip.ts] ////
+
+=== iteratorZip.ts ===
+declare const key: unique symbol;
+>key : unique symbol
+
+const tuples: [number, string][] = Iterator.zip([
+>tuples : [number, string][]
+>Iterator.zip([ [1, 2], new Set(["a", "b"]),] as const).toArray() : [1 | 2, string][]
+>Iterator.zip([ [1, 2], new Set(["a", "b"]),] as const).toArray : () => [1 | 2, string][]
+>Iterator.zip([ [1, 2], new Set(["a", "b"]),] as const) : IteratorObject<[1 | 2, string], undefined, unknown>
+>Iterator.zip : { (iterables: readonly [], options?: IteratorZipLongestOptions> | IteratorZipShortestOptions | IteratorZipStrictOptions): IteratorObject; | Iterator, ...(Iterable | Iterator)[]]>(iterables: T, options: IteratorZipLongestOptions | Iterator ? U : never : never : never; }>> & { padding: NoInfer<{ -readonly [K in keyof T]: T[K] extends infer T_1 ? T_1 extends T[K] ? T_1 extends Iterable | Iterator ? U : never : never : never; }>; }): IteratorObject<{ -readonly [K in keyof T]: T[K] extends infer T_1 ? T_1 extends T[K] ? T_1 extends Iterable | Iterator ? U : never : never : never; }, undefined, unknown>; | Iterator)[] | []>(iterables: T, options?: IteratorZipShortestOptions | IteratorZipStrictOptions): IteratorObject<{ -readonly [K in keyof T]: T[K] extends infer T_1 ? T_1 extends T[K] ? T_1 extends Iterable | Iterator ? U : never : never : never; }, undefined, unknown>; | Iterator)[] | []>(iterables: T, options: IteratorZipLongestOptions | Iterator ? U : never : never : never; }>>> | IteratorZipShortestOptions | IteratorZipStrictOptions): IteratorObject<{ -readonly [K in keyof T]: (T[K] extends infer T_1 ? T_1 extends T[K] ? T_1 extends Iterable | Iterator ? U : never : never : never) | undefined; }, undefined, unknown>; | Iterator>(iterables: Iterable, options?: IteratorZipShortestOptions | IteratorZipStrictOptions): IteratorObject<(T extends Iterable | Iterator ? U : never)[], undefined, unknown>; | Iterator>(iterables: Iterable, options: IteratorZipLongestOptions | Iterator ? U : never>>> | IteratorZipShortestOptions | IteratorZipStrictOptions): IteratorObject<((T extends Iterable | Iterator ? U : never) | undefined)[], undefined, unknown>; }
+>Iterator : IteratorConstructor
+>zip : { (iterables: readonly [], options?: IteratorZipLongestOptions> | IteratorZipShortestOptions | IteratorZipStrictOptions): IteratorObject; | Iterator, ...(Iterable | Iterator)[]]>(iterables: T, options: IteratorZipLongestOptions | Iterator ? U : never : never : never; }>> & { padding: NoInfer<{ -readonly [K in keyof T]: T[K] extends infer T_1 ? T_1 extends T[K] ? T_1 extends Iterable | Iterator ? U : never : never : never; }>; }): IteratorObject<{ -readonly [K in keyof T]: T[K] extends infer T_1 ? T_1 extends T[K] ? T_1 extends Iterable | Iterator