Skip to content

Commit 03468f2

Browse files
committed
TSDocs fixes
1 parent d433df5 commit 03468f2

File tree

7 files changed

+29
-21
lines changed

7 files changed

+29
-21
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interface Array<T> { // @type-options: no-redefine
66
* @param callbackFn - A function that accepts up to three arguments. The filterReject method calls the
77
* callbackFn function one time for each element in the array.
88
* @param thisArg - If provided, it will be used as this value for each invocation of
9-
* predicate. If it is not provided, undefined is used instead.
9+
* callbackFn function. If it is not provided, undefined is used instead.
1010
*/
1111
filterReject(callbackFn: (value: T, index: number, target: T[]) => unknown, thisArg?: any): T[];
1212
}
@@ -17,7 +17,7 @@ interface ReadonlyArray<T> { // @type-options: no-export
1717
* @param callbackFn - A function that accepts up to three arguments. The filterReject method calls the
1818
* callbackFn function one time for each element in the array.
1919
* @param thisArg - If provided, it will be used as this value for each invocation of
20-
* predicate. If it is not provided, undefined is used instead.
20+
* callbackFn function. If it is not provided, undefined is used instead.
2121
*/
2222
filterReject(callbackFn: (value: T, index: number, target: readonly T[]) => unknown, thisArg?: any): T[];
2323
}
@@ -28,7 +28,7 @@ interface Int8Array { // @type-options: no-export
2828
* @param callbackFn - A function that accepts up to three arguments. The filterReject method calls the
2929
* callbackFn function one time for each element in the array.
3030
* @param thisArg - If provided, it will be used as this value for each invocation of
31-
* predicate. If it is not provided, undefined is used instead.
31+
* callbackFn function. If it is not provided, undefined is used instead.
3232
*/
3333
filterReject(callbackFn: (value: number, index: number, target: Int8Array) => unknown, thisArg?: any): Int8Array;
3434
}
@@ -39,7 +39,7 @@ interface Uint8Array { // @type-options: no-export
3939
* @param callbackFn - A function that accepts up to three arguments. The filterReject method calls the
4040
* callbackFn function one time for each element in the array.
4141
* @param thisArg - If provided, it will be used as this value for each invocation of
42-
* predicate. If it is not provided, undefined is used instead.
42+
* callbackFn function. If it is not provided, undefined is used instead.
4343
*/
4444
filterReject(callbackFn: (value: number, index: number, target: Uint8Array) => unknown, thisArg?: any): Uint8Array;
4545
}
@@ -50,7 +50,7 @@ interface Uint8ClampedArray { // @type-options: no-export
5050
* @param callbackFn - A function that accepts up to three arguments. The filterReject method calls the
5151
* callbackFn function one time for each element in the array.
5252
* @param thisArg - If provided, it will be used as this value for each invocation of
53-
* predicate. If it is not provided, undefined is used instead.
53+
* callbackFn function. If it is not provided, undefined is used instead.
5454
*/
5555
filterReject(callbackFn: (value: number, index: number, target: Uint8ClampedArray) => unknown, thisArg?: any): Uint8ClampedArray;
5656
}
@@ -61,7 +61,7 @@ interface Int16Array { // @type-options: no-export
6161
* @param callbackFn - A function that accepts up to three arguments. The filterReject method calls the
6262
* callbackFn function one time for each element in the array.
6363
* @param thisArg - If provided, it will be used as this value for each invocation of
64-
* predicate. If it is not provided, undefined is used instead.
64+
* callbackFn function. If it is not provided, undefined is used instead.
6565
*/
6666
filterReject(callbackFn: (value: number, index: number, target: Int16Array) => unknown, thisArg?: any): Int16Array;
6767
}
@@ -72,7 +72,7 @@ interface Uint16Array { // @type-options: no-export
7272
* @param callbackFn - A function that accepts up to three arguments. The filterReject method calls the
7373
* callbackFn function one time for each element in the array.
7474
* @param thisArg - If provided, it will be used as this value for each invocation of
75-
* predicate. If it is not provided, undefined is used instead.
75+
* callbackFn function. If it is not provided, undefined is used instead.
7676
*/
7777
filterReject(callbackFn: (value: number, index: number, target: Uint16Array) => unknown, thisArg?: any): Uint16Array;
7878
}
@@ -83,7 +83,7 @@ interface Int32Array { // @type-options: no-export
8383
* @param callbackFn - A function that accepts up to three arguments. The filterReject method calls the
8484
* callbackFn function one time for each element in the array.
8585
* @param thisArg - If provided, it will be used as this value for each invocation of
86-
* predicate. If it is not provided, undefined is used instead.
86+
* callbackFn function. If it is not provided, undefined is used instead.
8787
*/
8888
filterReject(callbackFn: (value: number, index: number, target: Int32Array) => unknown, thisArg?: any): Int32Array;
8989
}
@@ -105,7 +105,7 @@ interface Float32Array { // @type-options: no-export
105105
* @param callbackFn - A function that accepts up to three arguments. The filterReject method calls the
106106
* callbackFn function one time for each element in the array.
107107
* @param thisArg - If provided, it will be used as this value for each invocation of
108-
* predicate. If it is not provided, undefined is used instead.
108+
* callbackFn function. If it is not provided, undefined is used instead.
109109
*/
110110
filterReject(callbackFn: (value: number, index: number, target: Float32Array) => unknown, thisArg?: any): Float32Array;
111111
}
@@ -116,7 +116,7 @@ interface Float64Array { // @type-options: no-export
116116
* @param callbackFn - A function that accepts up to three arguments. The filterReject method calls the
117117
* callbackFn function one time for each element in the array.
118118
* @param thisArg - If provided, it will be used as this value for each invocation of
119-
* predicate. If it is not provided, undefined is used instead.
119+
* callbackFn function. If it is not provided, undefined is used instead.
120120
*/
121121
filterReject(callbackFn: (value: number, index: number, target: Float64Array) => unknown, thisArg?: any): Float64Array;
122122
}
@@ -127,7 +127,7 @@ interface BigInt64Array { // @type-options: no-export
127127
* @param callbackFn - A function that accepts up to three arguments. The filterReject method calls the
128128
* callbackFn function one time for each element in the array.
129129
* @param thisArg - If provided, it will be used as this value for each invocation of
130-
* predicate. If it is not provided, undefined is used instead.
130+
* callbackFn function. If it is not provided, undefined is used instead.
131131
*/
132132
filterReject(callbackFn: (value: bigint, index: number, target: BigInt64Array) => unknown, thisArg?: any): BigInt64Array;
133133
}
@@ -138,7 +138,7 @@ interface BigUint64Array { // @type-options: no-export
138138
* @param callbackFn - A function that accepts up to three arguments. The filterReject method calls the
139139
* callbackFn function one time for each element in the array.
140140
* @param thisArg - If provided, it will be used as this value for each invocation of
141-
* predicate. If it is not provided, undefined is used instead.
141+
* callbackFn function. If it is not provided, undefined is used instead.
142142
*/
143143
filterReject(callbackFn: (value: bigint, index: number, target: BigUint64Array) => unknown, thisArg?: any): BigUint64Array;
144144
}

packages/core-js-types/src/base/proposals/array-is-template-object.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
interface ArrayConstructor { // @type-options: no-export
44
/**
5-
* Determines whether an `value` is a `TemplateStringsArray`
5+
* Determines whether a `value` is a `TemplateStringsArray`
66
* @param value - The value to be checked
77
* @returns `true` if `value` is a `TemplateStringsArray`, otherwise `false`
88
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ interface IteratorConstructor { // @type-options: no-extends
101101
/**
102102
* Creates a native iterator from an iterator or iterable object.
103103
* Returns its input if the input already inherits from the built-in Iterator class.
104-
* @param value - An iterator or iterable object to convert a native iterator.
104+
* @param value - An iterator or iterable object to convert to a native iterator.
105105
*/
106106
from<T>(value: Iterator<T, unknown, undefined> | Iterable<T, unknown, undefined>): IteratorObject<T, undefined, unknown>;
107107
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ interface IteratorConstructor { // @type-options: no-extends
1919
* @param iterables - An Iterable of iterables.
2020
* @param options - Optional object:
2121
* - 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;
22-
* - padding: an object specifying padding values for each key when mode is 'longest'.
23-
* @returns An iterator yielding objects with keys from the input iterables and values from the corresponding iterables.
22+
* - padding: an iterable specifying padding values for each position when mode is 'longest'.
23+
* @returns An iterator yielding arrays of values, collected one from each iterable.
2424
*/
2525
zip<T extends readonly Iterable<unknown>[]>(iterables: T, options?: ZipOptions): IteratorObject<{ [K in keyof T]: T[K] extends Iterable<infer V> ? V : never }, undefined, unknown>; // @type-options: prefix-return-type
2626
zip<T>(iterables: Iterable<Iterable<T>>, options?: ZipOptions): IteratorObject<T[], undefined, unknown>; // @type-options: prefix-return-type
2727

2828
/**
29-
* takes an object whose values are iterables and produces an iterable of objects where keys.
29+
* Takes an object whose values are iterables and produces an iterable of objects where keys
3030
* correspond to keys in the passed object.
3131
* @param record - An object of iterables.
3232
* @param options - Optional object:

packages/core-js-types/src/base/proposals/map-upsert.d.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@ interface Map<K, V> { // @type-options: no-redefine
88
/**
99
* Returns a specified element from the Map object.
1010
* If no element is associated with the specified key, a new element with the value `defaultValue` will be inserted into the Map and returned.
11+
* @param key - The key of the element to return.
12+
* @param defaultValue - The value to insert if the key is not already associated with an element.
1113
* @returns The element associated with the specified key, which will be `defaultValue` if no element previously existed.
1214
*/
1315
getOrInsert(key: K, defaultValue: V): V;
1416
/**
1517
* Returns a specified element from the Map object.
1618
* If no element is associated with the specified key, the result of passing the specified key to the `callback` function will be inserted into the Map and returned.
17-
* @returns The element associated with the specific key, which will be the newly computed value if no element previously existed.
19+
* @param key - The key of the element to return.
20+
* @param callback - A function that computes the value to insert if the key is not already associated with an element. It will be passed the key as an argument.
21+
* @returns The element associated with the specified key, which will be the newly computed value if no element previously existed.
1822
*/
1923
getOrInsertComputed(key: K, callback: (key: K) => V): V;
2024
}
@@ -23,13 +27,17 @@ interface WeakMap<K extends WeakKey, V> { // @type-options: no-redefine
2327
/**
2428
* Returns a specified element from the WeakMap object.
2529
* If no element is associated with the specified key, a new element with the value `defaultValue` will be inserted into the WeakMap and returned.
30+
* @param key - The key of the element to return.
31+
* @param defaultValue - The value to insert if the key is not already associated with an element.
2632
* @returns The element associated with the specified key, which will be `defaultValue` if no element previously existed.
2733
*/
2834
getOrInsert(key: K, defaultValue: V): V;
2935
/**
3036
* Returns a specified element from the WeakMap object.
3137
* If no element is associated with the specified key, the result of passing the specified key to the `callback` function will be inserted into the WeakMap and returned.
32-
* @returns The element associated with the specific key, which will be the newly computed value if no element previously existed.
38+
* @param key - The key of the element to return.
39+
* @param callback - A function that computes the value to insert if the key is not already associated with an element. It will be passed the key as an argument.
40+
* @returns The element associated with the specified key, which will be the newly computed value if no element previously existed.
3341
*/
3442
getOrInsertComputed(key: K, callback: (key: K) => V): V;
3543
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ declare namespace CoreJS {
162162
/**
163163
* Creates a native iterator from an iterator or iterable object.
164164
* Returns its input if the input already inherits from the built-in Iterator class.
165-
* @param value - An iterator or iterable object to convert a native iterator.
165+
* @param value - An iterator or iterable object to convert to a native iterator.
166166
*/
167167
from<T>(value: Iterator<T, unknown, undefined> | Iterable<T, unknown, undefined>): CoreJSIteratorObject<T, undefined, unknown>;
168168

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ declare namespace CoreJS {
168168
/**
169169
* Creates a native iterator from an iterator or iterable object.
170170
* Returns its input if the input already inherits from the built-in Iterator class.
171-
* @param value - An iterator or iterable object to convert a native iterator.
171+
* @param value - An iterator or iterable object to convert to a native iterator.
172172
*/
173173
from<T>(value: Iterator<T, unknown, undefined> | Iterable<T>): CoreJSIteratorObject<T, undefined, unknown>;
174174

0 commit comments

Comments
 (0)