Skip to content

Commit 5b3012b

Browse files
committed
AsyncIterator methods params alignment
1 parent 03468f2 commit 5b3012b

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,24 @@ interface AsyncIterator<T, TReturn = any, TNext = any> {
5353

5454
/**
5555
* Executes a provided function once for each element in the iterator.
56-
* @param callbackFn - A function that is called for each element of the iterator
56+
* @param callbackfn - A function that is called for each element of the iterator
5757
* @returns A `Promise` that resolves when all elements have been processed
5858
*/
59-
forEach(callbackFn: (value: T, index: number) => void | PromiseLike<void>): Promise<void>;
59+
forEach(callbackfn: (value: T, index: number) => void | PromiseLike<void>): Promise<void>;
6060

6161
/**
62-
* Creates a new `AsyncIterator` by applying the `mapper` function to each element of the original iterator.
63-
* @param mapper - A function that transforms each element of the iterator
62+
* Creates a new `AsyncIterator` by applying the `callbackfn` function to each element of the original iterator.
63+
* @param callbackfn - A function that transforms each element of the iterator
6464
* @returns A new `AsyncIterator`
6565
*/
66-
map<U>(mapper: (value: T, index: number) => U): AsyncIteratorObject<Awaited<U>, undefined, unknown>;
66+
map<U>(callbackfn: (value: T, index: number) => U): AsyncIteratorObject<Awaited<U>, undefined, unknown>;
6767

6868
/**
69-
* Reduces the elements of the iterator to a single value using the `reducer` function.
70-
* @param reducer - A function that combines two elements of the iterator
69+
* Reduces the elements of the iterator to a single value using the `callbackfn` function.
70+
* @param callbackfn - A function that combines two elements of the iterator
7171
* @returns A promise that resolves to the reduced value
7272
*/
73-
reduce(reducer: (accumulator: T, value: T, index: number) => T): Promise<T>;
73+
reduce(callbackfn: (accumulator: T, value: T, index: number) => T): Promise<T>;
7474

7575
/**
7676
* Reduces the elements of the iterator to a single value using the `reducer` function.

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,40 +57,40 @@ declare namespace CoreJS {
5757

5858
/**
5959
* Executes a provided function once for each element in the iterator.
60-
* @param callbackFn - A function that is called for each element of the iterator
60+
* @param callbackfn - A function that is called for each element of the iterator
6161
* @returns A `Promise` that resolves when all elements have been processed
6262
*/
63-
forEach(callbackFn: (value: T, index: number) => void | PromiseLike<void>): CoreJSPromise<void>;
63+
forEach(callbackfn: (value: T, index: number) => void | PromiseLike<void>): CoreJSPromise<void>;
6464

6565
/**
66-
* Creates a new `AsyncIterator` by applying the `mapper` function to each element of the original iterator.
67-
* @param mapper - A function that transforms each element of the iterator
66+
* Creates a new `AsyncIterator` by applying the `callbackfn` function to each element of the original iterator.
67+
* @param callbackfn - A function that transforms each element of the iterator
6868
* @returns A new `AsyncIterator`
6969
*/
70-
map<U>(mapper: (value: T, index: number) => U): CoreJSAsyncIteratorObject<Awaited<U>, undefined, unknown>;
70+
map<U>(callbackfn: (value: T, index: number) => U): CoreJSAsyncIteratorObject<Awaited<U>, undefined, unknown>;
7171

7272
/**
73-
* Reduces the elements of the iterator to a single value using the `reducer` function.
74-
* @param reducer - A function that combines two elements of the iterator
73+
* Reduces the elements of the iterator to a single value using the `callbackfn` function.
74+
* @param callbackfn - A function that combines two elements of the iterator
7575
* @returns A `Promise` that resolves to the reduced value
7676
*/
77-
reduce(reducer: (accumulator: T, value: T, index: number) => T): CoreJSPromise<T>;
77+
reduce(callbackfn: (accumulator: T, value: T, index: number) => T): CoreJSPromise<T>;
7878

7979
/**
80-
* Reduces the elements of the iterator to a single value using the `reducer` function.
81-
* @param reducer - A function that combines two elements of the iterator
80+
* Reduces the elements of the iterator to a single value using the `callbackfn` function.
81+
* @param callbackfn - A function that combines two elements of the iterator
8282
* @param initialValue - The initial value to start the reduction
8383
* @returns A `Promise` that resolves to the reduced value
8484
*/
85-
reduce(reducer: (accumulator: T, value: T, index: number) => T, initialValue: T): CoreJSPromise<T>;
85+
reduce(callbackfn: (accumulator: T, value: T, index: number) => T, initialValue: T): CoreJSPromise<T>;
8686

8787
/**
88-
* Reduces the elements of the iterator to a single value using the `reducer` function.
89-
* @param reducer - A function that combines two elements of the iterator
88+
* Reduces the elements of the iterator to a single value using the `callbackfn` function.
89+
* @param callbackfn - A function that combines two elements of the iterator
9090
* @param initialValue - The initial value to start the accumulation. Required when the accumulator type differs from the element type.
9191
* @returns A `Promise` that resolves to the reduced value
9292
*/
93-
reduce<U>(reducer: (accumulator: U, value: T, index: number) => U, initialValue: U): CoreJSPromise<U>;
93+
reduce<U>(callbackfn: (accumulator: U, value: T, index: number) => U, initialValue: U): CoreJSPromise<U>;
9494

9595
/**
9696
* Checks if any value in the iterator matches a given `predicate`

0 commit comments

Comments
 (0)