Skip to content

Commit 47e2cbf

Browse files
authored
docs: fix and align TSDoc comments in iter declarations
PR-URL: #12726 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 58b187e commit 47e2cbf

10 files changed

Lines changed: 14 additions & 12 deletions

File tree

lib/node_modules/@stdlib/iter/cusome-by/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ type Predicate<T, U> = Nullary<U> | Unary<T, U> | Binary<T, U>;
6262
* Returns an iterator which cumulatively tests whether at least `n` iterated values pass a test implemented by a predicate function.
6363
*
6464
* @param iterator - source iterator
65-
* @param n - minimum number of truthy elements
65+
* @param n - minimum number of successful values
6666
* @param predicate - predicate function
6767
* @param thisArg - execution context
6868
* @returns iterator

lib/node_modules/@stdlib/iter/cusome/docs/types/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ type Iterator = Iter | IterableIterator;
5555
* v = it.next().value;
5656
* // returns true
5757
*
58-
* // ..
58+
* var bool = it.next().done;
59+
* // returns true
5960
*/
6061
declare function iterCuSome( iterator: Iterator, n: number ): Iterator;
6162

lib/node_modules/@stdlib/iter/datespace/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ declare function iterDatespace( start: number | string | Date, stop: number | st
8181
* @param start - starting date as either a `Date` object, JavaScript timestamp, or a date string (inclusive)
8282
* @param stop - stopping date as either a `Date` object, JavaScript timestamp, or a date string (inclusive)
8383
* @param options - function options
84-
* @param options.round - specifies how sub-millisecond times should be rounded: 'floor', 'ceil', or 'round' (default: 'floor' )
84+
* @param options.round - specifies how sub-millisecond times should be rounded: 'floor', 'ceil', or 'round' (default: 'floor')
8585
* @throws a numeric `start` argument must be a nonnegative integer
8686
* @throws a numeric `stop` argument must be a nonnegative integer
8787
* @throws unable to parse date string

lib/node_modules/@stdlib/iter/dedupe-by/docs/types/index.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ type Quinary = ( curr: any, sprev: any, dprev: any, index: number, acc: any ) =>
8686
* Indicates whether an iterated value is a "duplicate".
8787
*
8888
* @param curr - current source iterated value
89-
* @param prev - previous iterated value
90-
* @param index - iteration index (zero-based)
89+
* @param sprev - previous source iterated value
90+
* @param dprev - previous downstream iterated value
91+
* @param index - source iteration index (zero-based)
9192
* @param acc - previous resolved value
9293
* @returns resolved value
9394
*/

lib/node_modules/@stdlib/iter/do-until-each/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ type Predicate = nullaryPredicate | unaryPredicate | binaryPredicate;
132132
* // returns 2
133133
*
134134
* r = it.next().value;
135-
* // undefined
135+
* // returns undefined
136136
*
137137
* // ...
138138
*/

lib/node_modules/@stdlib/iter/do-while-each/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ type Predicate = nullaryPredicate | unaryPredicate | binaryPredicate;
9393

9494
/**
9595
* Returns an iterator which invokes a function for each iterated value **before** returning the iterated value until either a predicate function returns `false` or the iterator has iterated over all values.
96-
* The condition is evaluated *after* executing the provided function; thus, fcn` *always* executes at least once.
96+
* The condition is evaluated *after* executing the provided function; thus, `fcn` *always* executes at least once.
9797
*
9898
* ## Notes
9999
*

lib/node_modules/@stdlib/iter/fill/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type Iterator = Iter | IterableIterator;
3535
*
3636
* @param iterator - input iterator
3737
* @param value - static (fill) value
38-
* @param begin - start iteration index (inclusive)
38+
* @param begin - start iteration index (inclusive; default: 0)
3939
* @param end - end iteration index (non-inclusive)
4040
* @returns iterator
4141
*

lib/node_modules/@stdlib/iter/pipeline-thunk/docs/types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ import { Iterator as Iter, IterableIterator } from '@stdlib/types/iter';
2626
type Iterator = Iter | IterableIterator;
2727

2828
/**
29-
* Iterator function
29+
* Iterator function.
3030
*
3131
* @param iterator - input iterator
3232
* @param args - function arguments
33-
* @returns hash value
33+
* @returns iterator function result
3434
*/
3535
type IteratorFunction = ( iterator: Iterator, ...args: Array<any> ) => any;
3636

lib/node_modules/@stdlib/iter/replicate-by/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ type Ternary = ( value: any, index: number, n: number ) => number;
7070
type Callback = Nullary | Unary | Binary | Ternary;
7171

7272
/**
73-
* Returns an iterator which invokes a function for each iterated value.
73+
* Returns an iterator which replicates each iterated value according to a provided function.
7474
*
7575
* ## Notes
7676
*

lib/node_modules/@stdlib/iter/strided/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type Iterator = Iter | IterableIterator;
3535
* @param iterator - input iterator
3636
* @param stride - stride
3737
* @param offset - offset
38-
* @param eager - boolean indicating whether to eagerly advance an input iterator when provided a non-zero `offset`
38+
* @param eager - boolean indicating whether to eagerly advance an input iterator when provided a non-zero `offset` (default: false)
3939
* @returns iterator
4040
*
4141
* @example

0 commit comments

Comments
 (0)