Skip to content

Commit c77af29

Browse files
committed
fix some jsdoc and param names
1 parent 4210152 commit c77af29

File tree

11 files changed

+39
-34
lines changed

11 files changed

+39
-34
lines changed

packages/core-js-types/src/base/proposals/array-buffer-base64.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ interface Uint8ArrayConstructor {
3636

3737
/**
3838
* Creates a new `Uint8Array` from a base16-encoded string.
39+
* @param string - The base16-encoded string.
3940
* @returns A new `Uint8Array` instance.
4041
*/
41-
fromHex(str: string): Uint8Array;
42+
fromHex(string: string): Uint8Array;
4243
}
4344

4445
interface Uint8Array {

packages/core-js-types/src/base/proposals/array-filtering.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ interface Uint32Array { // @type-options: no-export
9494
* @param callbackFn - A function that accepts up to three arguments. The filterReject method calls the
9595
* callbackFn function one time for each element in the array.
9696
* @param thisArg - If provided, it will be used as this value for each invocation of
97-
* predicate. If it is not provided, undefined is used instead.
97+
* callbackFn function. If it is not provided, undefined is used instead.
9898
*/
9999
filterReject(callbackFn: (value: number, index: number, target: Uint32Array) => unknown, thisArg?: any): Uint32Array;
100100
}

packages/core-js-types/src/base/proposals/array-unique.d.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ interface Int8Array { // @type-options: no-export
2525
* Returns a new array with unique items, determined by the resolver function or property key
2626
* @param resolver - A function that resolves the value to check uniqueness against,
2727
* or a property key to compare the value from each item
28-
* @returns A new `Array` with unique items
28+
* @returns A new `Int8Array` with unique items
2929
*/
3030
uniqueBy(resolver?: PropertyKey | ((value: number) => unknown)): Int8Array;
3131
}
@@ -35,7 +35,7 @@ interface Uint8Array { // @type-options: no-export
3535
* Returns a new array with unique items, determined by the resolver function or property key
3636
* @param resolver - A function that resolves the value to check uniqueness against,
3737
* or a property key to compare the value from each item
38-
* @returns A new `Array` with unique items
38+
* @returns A new `Uint8Array` with unique items
3939
*/
4040
uniqueBy(resolver?: PropertyKey | ((value: number) => unknown)): Uint8Array;
4141
}
@@ -45,7 +45,7 @@ interface Uint8ClampedArray { // @type-options: no-export
4545
* Returns a new array with unique items, determined by the resolver function or property key
4646
* @param resolver - A function that resolves the value to check uniqueness against,
4747
* or a property key to compare the value from each item
48-
* @returns A new `Array` with unique items
48+
* @returns A new `Uint8ClampedArray` with unique items
4949
*/
5050
uniqueBy(resolver?: PropertyKey | ((value: number) => unknown)): Uint8ClampedArray;
5151
}
@@ -55,7 +55,7 @@ interface Int16Array { // @type-options: no-export
5555
* Returns a new array with unique items, determined by the resolver function or property key
5656
* @param resolver - A function that resolves the value to check uniqueness against,
5757
* or a property key to compare the value from each item
58-
* @returns A new `Array` with unique items
58+
* @returns A new `Int16Array` with unique items
5959
*/
6060
uniqueBy(resolver?: PropertyKey | ((value: number) => unknown)): Int16Array;
6161
}
@@ -65,7 +65,7 @@ interface Uint16Array { // @type-options: no-export
6565
* Returns a new array with unique items, determined by the resolver function or property key
6666
* @param resolver - A function that resolves the value to check uniqueness against,
6767
* or a property key to compare the value from each item
68-
* @returns A new `Array` with unique items
68+
* @returns A new `Uint16Array` with unique items
6969
*/
7070
uniqueBy(resolver?: PropertyKey | ((value: number) => unknown)): Uint16Array;
7171
}
@@ -75,7 +75,7 @@ interface Int32Array { // @type-options: no-export
7575
* Returns a new array with unique items, determined by the resolver function or property key
7676
* @param resolver - A function that resolves the value to check uniqueness against,
7777
* or a property key to compare the value from each item
78-
* @returns A new `Array` with unique items
78+
* @returns A new `Int32Array` with unique items
7979
*/
8080
uniqueBy(resolver?: PropertyKey | ((value: number) => unknown)): Int32Array;
8181
}
@@ -85,7 +85,7 @@ interface Uint32Array { // @type-options: no-export
8585
* Returns a new array with unique items, determined by the resolver function or property key
8686
* @param resolver - A function that resolves the value to check uniqueness against,
8787
* or a property key to compare the value from each item
88-
* @returns A new `Array` with unique items
88+
* @returns A new `Uint32Array` with unique items
8989
*/
9090
uniqueBy(resolver?: PropertyKey | ((value: number) => unknown)): Uint32Array;
9191
}
@@ -95,7 +95,7 @@ interface Float32Array { // @type-options: no-export
9595
* Returns a new array with unique items, determined by the resolver function or property key
9696
* @param resolver - A function that resolves the value to check uniqueness against,
9797
* or a property key to compare the value from each item
98-
* @returns A new `Array` with unique items
98+
* @returns A new `Float32Array` with unique items
9999
*/
100100
uniqueBy(resolver?: PropertyKey | ((value: number) => unknown)): Float32Array;
101101
}
@@ -105,7 +105,7 @@ interface Float64Array { // @type-options: no-export
105105
* Returns a new array with unique items, determined by the resolver function or property key
106106
* @param resolver - A function that resolves the value to check uniqueness against,
107107
* or a property key to compare the value from each item
108-
* @returns A new `Array` with unique items
108+
* @returns A new `Float64Array` with unique items
109109
*/
110110
uniqueBy(resolver?: PropertyKey | ((value: number) => unknown)): Float64Array;
111111
}
@@ -115,7 +115,7 @@ interface BigInt64Array { // @type-options: no-export
115115
* Returns a new array with unique items, determined by the resolver function or property key
116116
* @param resolver - A function that resolves the value to check uniqueness against,
117117
* or a property key to compare the value from each item
118-
* @returns A new `Array` with unique items
118+
* @returns A new `BigInt64Array` with unique items
119119
*/
120120
uniqueBy(resolver?: PropertyKey | ((value: bigint) => unknown)): BigInt64Array;
121121
}
@@ -125,7 +125,7 @@ interface BigUint64Array { // @type-options: no-export
125125
* Returns a new array with unique items, determined by the resolver function or property key
126126
* @param resolver - A function that resolves the value to check uniqueness against,
127127
* or a property key to compare the value from each item
128-
* @returns A new `Array` with unique items
128+
* @returns A new `BigUint64Array` with unique items
129129
*/
130130
uniqueBy(resolver?: PropertyKey | ((value: bigint) => unknown)): BigUint64Array;
131131
}

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface AsyncIterator<T, TReturn = any, TNext = any> {
2424
/**
2525
* Check if every value generated by the iterator passes the `predicate` function.
2626
* @param predicate - A function that tests each element of the iterator
27-
* @returns A promise that resolves to `true` if all elements pass the test, otherwise `false`
27+
* @returns A `Promise` that resolves to `true` if all elements pass the test, otherwise `false`
2828
*/
2929
every(predicate: (value: T, index: number) => unknown): Promise<boolean>;
3030

@@ -68,25 +68,25 @@ interface AsyncIterator<T, TReturn = any, TNext = any> {
6868
/**
6969
* Reduces the elements of the iterator to a single value using the `callbackfn` function.
7070
* @param callbackfn - A function that combines two elements of the iterator
71-
* @returns A promise that resolves to the reduced value
71+
* @returns A `Promise` that resolves to the reduced value
7272
*/
7373
reduce(callbackfn: (accumulator: T, value: T, index: number) => T): Promise<T>;
7474

7575
/**
76-
* Reduces the elements of the iterator to a single value using the `reducer` function.
77-
* @param reducer - A function that combines two elements of the iterator
76+
* Reduces the elements of the iterator to a single value using the `callbackfn` function.
77+
* @param callbackfn - A function that combines two elements of the iterator
7878
* @param initialValue - The initial value to start the reduction
79-
* @returns A promise that resolves to the reduced value
79+
* @returns A `Promise` that resolves to the reduced value
8080
*/
81-
reduce(reducer: (accumulator: T, value: T, index: number) => T, initialValue: T): Promise<T>;
81+
reduce(callbackfn: (accumulator: T, value: T, index: number) => T, initialValue: T): Promise<T>;
8282

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

9191
/**
9292
* Checks if any value in the iterator matches a given `predicate`

packages/core-js-types/src/base/proposals/await-dictionary.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface PromiseConstructor {
1515
* Takes an object whose values are promises and returns a single `Promise` that resolves
1616
* to an object with the same keys, after all of the input promises have settled.
1717
* @param promises - An object of promises
18-
* @returns A new Promise that resolves to an object with the same keys as the input object,
18+
* @returns A new `Promise` that resolves to an object with the same keys as the input object,
1919
* where each key maps to the settlement result (`{ status, value }` or `{ status, reason }`) of the corresponding promise.
2020
*/
2121
allSettledKeyed<D extends Record<PropertyKey, unknown>>(promises: D): Promise<{ [k in keyof D]: CoreJS.CoreJSPromiseSettledResult<Awaited<D[k]>> }>;

packages/core-js-types/src/base/pure/core-js-types/promise.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ declare namespace CoreJS {
5858
* Takes an object whose values are promises and returns a single `Promise` that resolves
5959
* to an object with the same keys, after all of the input promises have settled.
6060
* @param promises - An object of promises
61-
* @returns A new Promise that resolves to an object with the same keys as the input object,
61+
* @returns A new `Promise` that resolves to an object with the same keys as the input object,
6262
* where each key maps to the settlement result (`{ status, value }` or `{ status, reason }`) of the corresponding promise.
6363
*/
6464
allSettledKeyed<D extends Record<PropertyKey, unknown>>(promises: D): CoreJSPromise<{ [k in keyof D]: CoreJS.CoreJSPromiseSettledResult<Awaited<D[k]>> }>;

packages/core-js-types/src/base/pure/proposals/array-buffer-transfer.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ declare namespace CoreJS {
1414
/**
1515
* Creates a new `ArrayBuffer` with the same byte content as this buffer, then detaches this buffer.
1616
* @param newByteLength - If provided, specifies the `byteLength` of the new `ArrayBuffer`
17-
* @throws `RangeError` If this `ArrayBuffer` is resizable and newByteLength is greater than the `maxByteLength` of this `ArrayBuffer`
18-
* @throws `TypeError` If this `ArrayBuffer` is already detached, or if it can only be detached by designated operations
17+
* @throws RangeError If this `ArrayBuffer` is resizable and newByteLength is greater than the `maxByteLength` of this `ArrayBuffer`
18+
* @throws TypeError If this `ArrayBuffer` is already detached, or if it can only be detached by designated operations
1919
* @returns A new `ArrayBuffer` object
2020
*/
2121
transfer(newByteLength?: number): CoreJSArrayBuffer;
2222

2323
/**
2424
* Creates a new non-resizable `ArrayBuffer` with the same byte content as this buffer, then detaches this buffer.
2525
* @param newByteLength - If provided, specifies the `byteLength` of the new `ArrayBuffer`
26-
* @throws `TypeError` If this `ArrayBuffer` is already detached, or if it can only be detached by designated operations
26+
* @throws TypeError If this `ArrayBuffer` is already detached, or if it can only be detached by designated operations
2727
* @returns A new `ArrayBuffer` object
2828
*/
2929
transferToFixedLength(newByteLength?: number): CoreJSArrayBuffer;

packages/core-js-types/src/base/pure/proposals/array-constructor.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ declare namespace CoreJS {
3232
fromAsync<T, U>(iterableOrArrayLike: CoreJSAsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): CoreJSPromise<Awaited<U>[]>;
3333

3434
/**
35-
* Determines whether an `value` is a `TemplateStringsArray`
35+
* Determines whether a `value` is a `TemplateStringsArray`
3636
* @param value - The value to be checked
3737
* @returns `true` if `value` is a `TemplateStringsArray`, otherwise `false`
3838
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ declare namespace CoreJS {
2828
/**
2929
* Check if every value generated by the iterator passes the `predicate` function.
3030
* @param predicate - A function that tests each element of the iterator
31-
* @returns A promise that resolves to `true` if all elements pass the test, otherwise `false`
31+
* @returns A `Promise` that resolves to `true` if all elements pass the test, otherwise `false`
3232
*/
3333
every(predicate: (value: T, index: number) => unknown): CoreJSPromise<boolean>;
3434

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ declare namespace CoreJS {
155155
find<S extends T>(predicate: (value: T, index: number) => value is S): S | undefined;
156156
find(predicate: (value: T, index: number) => unknown): T | undefined;
157157

158+
/**
159+
* Creates a string by concatenating all elements provided by the iterator, separated by the specified separator.
160+
* @param separator - A string to separate each element. If omitted, the elements are separated by commas.
161+
*/
158162
join(separator?: unknown): string;
159163
}
160164

@@ -172,14 +176,14 @@ declare namespace CoreJS {
172176
* @param iterables - An Iterable of iterables.
173177
* @param options - Optional object:
174178
* - mode: 'shortest' (default) to stop at the shortest iterable | 'longest' to stop at the longest iterable | 'strict' to throw if iterables are not the same length;
175-
* - padding: an object specifying padding values for each key when mode is 'longest'.
176-
* @returns An iterator yielding objects with keys from the input iterables and values from the corresponding iterables.
179+
* - padding: an iterable specifying padding values for each position when mode is 'longest'.
180+
* @returns An iterator yielding arrays of values, collected one from each iterable.
177181
*/
178182
zip<T extends readonly Iterable<unknown>[]>(iterables: T, options?: ZipOptions): CoreJSIteratorObject<{ [K in keyof T]: T[K] extends Iterable<infer V> ? V : never }, undefined, unknown>;
179183
zip<T>(iterables: Iterable<Iterable<T, unknown, undefined>>, options?: ZipOptions): CoreJSIteratorObject<T[], undefined, unknown>;
180184

181185
/**
182-
* takes an object whose values are iterables and produces an iterable of objects where keys.
186+
* Takes an object whose values are iterables and produces an iterable of objects where keys
183187
* correspond to keys in the passed object.
184188
* @param record - An object of iterables.
185189
* @param options - Optional object:

0 commit comments

Comments
 (0)