Skip to content

Commit 65bb542

Browse files
committed
AsyncIterator.flatMap alignment & fix TSDocs
1 parent c695053 commit 65bb542

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/core-js-types/src/base/proposals/async-iterator-helpers.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ interface AsyncIterator<T, TReturn = any, TNext = any> {
4545
find(predicate: (value: T, index: number) => unknown): Promise<T | undefined>;
4646

4747
/**
48-
* Creates a new `AsyncIterator` by applying the `mapper` function to each element of the original iterator and flattening the result.
48+
* Creates a new `AsyncIterator` by applying the `callback` function to each element of the original iterator and flattening the result.
4949
* @param callback - A function that transforms each element of the iterator
5050
* @returns A new `AsyncIterator`
5151
*/

packages/core-js-types/src/base/pure/proposals/async-iterator-helpers.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ declare namespace CoreJS {
4949
find(predicate: (value: T, index: number) => unknown): CoreJSPromise<T | undefined>;
5050

5151
/**
52-
* Creates a new `AsyncIterator` by applying the `mapper` function to each element of the original iterator and flattening the result.
53-
* @param mapper - A function that transforms each element of the iterator
52+
* Creates a new `AsyncIterator` by applying the `callback` function to each element of the original iterator and flattening the result.
53+
* @param callback - A function that transforms each element of the iterator
5454
* @returns A new `AsyncIterator`
5555
*/
56-
flatMap<U>(mapper: (value: T, index: number) => Iterator<U, unknown, undefined> | Iterable<U, unknown, undefined> | CoreJSAsyncIterator<U> | CoreJSAsyncIterable<U>): CoreJSAsyncIteratorObject<U, undefined, unknown>;
56+
flatMap<U>(callback: (value: T, index: number) => Iterator<U, unknown, undefined> | Iterable<U, unknown, undefined> | CoreJSAsyncIterator<U> | CoreJSAsyncIterable<U>): CoreJSAsyncIteratorObject<U, undefined, unknown>;
5757

5858
/**
5959
* Executes a provided function once for each element in the iterator.

0 commit comments

Comments
 (0)