Skip to content

Commit 8ad0279

Browse files
authored
docs: update iter TypeScript declarations
PR-URL: #12745 Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>
1 parent 4b1307f commit 8ad0279

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

  • lib/node_modules/@stdlib/iter/docs/types

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -476,15 +476,16 @@ interface Namespace {
476476
* v = it.next().value;
477477
* // returns true
478478
*
479-
* // ..
479+
* var bool = it.next().done;
480+
* // returns true
480481
*/
481482
iterCuSome: typeof iterCuSome;
482483

483484
/**
484485
* Returns an iterator which cumulatively tests whether at least `n` iterated values pass a test implemented by a predicate function.
485486
*
486487
* @param iterator - source iterator
487-
* @param n - minimum number of truthy elements
488+
* @param n - minimum number of successful values
488489
* @param predicate - predicate function
489490
* @param thisArg - execution context
490491
* @returns iterator
@@ -525,7 +526,7 @@ interface Namespace {
525526
* @param start - starting date as either a `Date` object, JavaScript timestamp, or a date string (inclusive)
526527
* @param stop - stopping date as either a `Date` object, JavaScript timestamp, or a date string (inclusive)
527528
* @param options - function options
528-
* @param options.round - specifies how sub-millisecond times should be rounded: 'floor', 'ceil', or 'round' (default: 'floor' )
529+
* @param options.round - specifies how sub-millisecond times should be rounded: 'floor', 'ceil', or 'round' (default: 'floor')
529530
* @throws a numeric `start` argument must be a nonnegative integer
530531
* @throws a numeric `stop` argument must be a nonnegative integer
531532
* @throws unable to parse date string
@@ -661,15 +662,15 @@ interface Namespace {
661662
* // returns 2
662663
*
663664
* r = it.next().value;
664-
* // undefined
665+
* // returns undefined
665666
*
666667
* // ...
667668
*/
668669
iterDoUntilEach: typeof iterDoUntilEach;
669670

670671
/**
671672
* 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.
672-
* The condition is evaluated *after* executing the provided function; thus, fcn` *always* executes at least once.
673+
* The condition is evaluated *after* executing the provided function; thus, `fcn` *always* executes at least once.
673674
*
674675
* ## Notes
675676
*
@@ -780,7 +781,7 @@ interface Namespace {
780781
*
781782
* @param iterator - input iterator
782783
* @param value - static (fill) value
783-
* @param begin - start iteration index (inclusive)
784+
* @param begin - start iteration index (inclusive; default: 0)
784785
* @param end - end iteration index (non-inclusive)
785786
* @returns iterator
786787
*
@@ -1537,7 +1538,7 @@ interface Namespace {
15371538
iterReplicate: typeof iterReplicate;
15381539

15391540
/**
1540-
* Returns an iterator which invokes a function for each iterated value.
1541+
* Returns an iterator which replicates each iterated value according to a provided function.
15411542
*
15421543
* ## Notes
15431544
*
@@ -1724,7 +1725,7 @@ interface Namespace {
17241725
* @param iterator - input iterator
17251726
* @param stride - stride
17261727
* @param offset - offset
1727-
* @param eager - boolean indicating whether to eagerly advance an input iterator when provided a non-zero `offset`
1728+
* @param eager - boolean indicating whether to eagerly advance an input iterator when provided a non-zero `offset` (default: false)
17281729
* @returns iterator
17291730
*
17301731
* @example

0 commit comments

Comments
 (0)