From 40d250d623cd13f4d4a970ba2d0f50204d549b57 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Mon, 8 Jun 2026 23:12:27 -0500 Subject: [PATCH] docs: fix and align TSDoc comments in `iter` declarations --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../@stdlib/iter/cusome-by/docs/types/index.d.ts | 2 +- lib/node_modules/@stdlib/iter/cusome/docs/types/index.d.ts | 3 ++- .../@stdlib/iter/datespace/docs/types/index.d.ts | 2 +- .../@stdlib/iter/dedupe-by/docs/types/index.d.ts | 5 +++-- .../@stdlib/iter/do-until-each/docs/types/index.d.ts | 2 +- .../@stdlib/iter/do-while-each/docs/types/index.d.ts | 2 +- lib/node_modules/@stdlib/iter/fill/docs/types/index.d.ts | 2 +- .../@stdlib/iter/pipeline-thunk/docs/types/index.d.ts | 4 ++-- .../@stdlib/iter/replicate-by/docs/types/index.d.ts | 2 +- lib/node_modules/@stdlib/iter/strided/docs/types/index.d.ts | 2 +- 10 files changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/node_modules/@stdlib/iter/cusome-by/docs/types/index.d.ts b/lib/node_modules/@stdlib/iter/cusome-by/docs/types/index.d.ts index 5751a84d3150..046628f2aaa1 100644 --- a/lib/node_modules/@stdlib/iter/cusome-by/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/iter/cusome-by/docs/types/index.d.ts @@ -62,7 +62,7 @@ type Predicate = Nullary | Unary | Binary; * Returns an iterator which cumulatively tests whether at least `n` iterated values pass a test implemented by a predicate function. * * @param iterator - source iterator -* @param n - minimum number of truthy elements +* @param n - minimum number of successful values * @param predicate - predicate function * @param thisArg - execution context * @returns iterator diff --git a/lib/node_modules/@stdlib/iter/cusome/docs/types/index.d.ts b/lib/node_modules/@stdlib/iter/cusome/docs/types/index.d.ts index dcbf612222b5..9619f3955ec5 100644 --- a/lib/node_modules/@stdlib/iter/cusome/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/iter/cusome/docs/types/index.d.ts @@ -55,7 +55,8 @@ type Iterator = Iter | IterableIterator; * v = it.next().value; * // returns true * -* // .. +* var bool = it.next().done; +* // returns true */ declare function iterCuSome( iterator: Iterator, n: number ): Iterator; diff --git a/lib/node_modules/@stdlib/iter/datespace/docs/types/index.d.ts b/lib/node_modules/@stdlib/iter/datespace/docs/types/index.d.ts index ef1f34ed5508..ba4f6270ef87 100644 --- a/lib/node_modules/@stdlib/iter/datespace/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/iter/datespace/docs/types/index.d.ts @@ -81,7 +81,7 @@ declare function iterDatespace( start: number | string | Date, stop: number | st * @param start - starting date as either a `Date` object, JavaScript timestamp, or a date string (inclusive) * @param stop - stopping date as either a `Date` object, JavaScript timestamp, or a date string (inclusive) * @param options - function options -* @param options.round - specifies how sub-millisecond times should be rounded: 'floor', 'ceil', or 'round' (default: 'floor' ) +* @param options.round - specifies how sub-millisecond times should be rounded: 'floor', 'ceil', or 'round' (default: 'floor') * @throws a numeric `start` argument must be a nonnegative integer * @throws a numeric `stop` argument must be a nonnegative integer * @throws unable to parse date string diff --git a/lib/node_modules/@stdlib/iter/dedupe-by/docs/types/index.d.ts b/lib/node_modules/@stdlib/iter/dedupe-by/docs/types/index.d.ts index 1040cc41a1e6..f0f1e5121071 100644 --- a/lib/node_modules/@stdlib/iter/dedupe-by/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/iter/dedupe-by/docs/types/index.d.ts @@ -86,8 +86,9 @@ type Quinary = ( curr: any, sprev: any, dprev: any, index: number, acc: any ) => * Indicates whether an iterated value is a "duplicate". * * @param curr - current source iterated value -* @param prev - previous iterated value -* @param index - iteration index (zero-based) +* @param sprev - previous source iterated value +* @param dprev - previous downstream iterated value +* @param index - source iteration index (zero-based) * @param acc - previous resolved value * @returns resolved value */ diff --git a/lib/node_modules/@stdlib/iter/do-until-each/docs/types/index.d.ts b/lib/node_modules/@stdlib/iter/do-until-each/docs/types/index.d.ts index be9e34e7118f..a2041f862108 100644 --- a/lib/node_modules/@stdlib/iter/do-until-each/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/iter/do-until-each/docs/types/index.d.ts @@ -132,7 +132,7 @@ type Predicate = nullaryPredicate | unaryPredicate | binaryPredicate; * // returns 2 * * r = it.next().value; -* // undefined +* // returns undefined * * // ... */ diff --git a/lib/node_modules/@stdlib/iter/do-while-each/docs/types/index.d.ts b/lib/node_modules/@stdlib/iter/do-while-each/docs/types/index.d.ts index cd8d4dc00988..19c6a75775f4 100644 --- a/lib/node_modules/@stdlib/iter/do-while-each/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/iter/do-while-each/docs/types/index.d.ts @@ -93,7 +93,7 @@ type Predicate = nullaryPredicate | unaryPredicate | binaryPredicate; /** * 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. -* The condition is evaluated *after* executing the provided function; thus, fcn` *always* executes at least once. +* The condition is evaluated *after* executing the provided function; thus, `fcn` *always* executes at least once. * * ## Notes * diff --git a/lib/node_modules/@stdlib/iter/fill/docs/types/index.d.ts b/lib/node_modules/@stdlib/iter/fill/docs/types/index.d.ts index d195d4d28d0c..0f5e29330b0a 100644 --- a/lib/node_modules/@stdlib/iter/fill/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/iter/fill/docs/types/index.d.ts @@ -35,7 +35,7 @@ type Iterator = Iter | IterableIterator; * * @param iterator - input iterator * @param value - static (fill) value -* @param begin - start iteration index (inclusive) +* @param begin - start iteration index (inclusive; default: 0) * @param end - end iteration index (non-inclusive) * @returns iterator * diff --git a/lib/node_modules/@stdlib/iter/pipeline-thunk/docs/types/index.d.ts b/lib/node_modules/@stdlib/iter/pipeline-thunk/docs/types/index.d.ts index c15c2c2b0b85..db306ffe09e5 100644 --- a/lib/node_modules/@stdlib/iter/pipeline-thunk/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/iter/pipeline-thunk/docs/types/index.d.ts @@ -26,11 +26,11 @@ import { Iterator as Iter, IterableIterator } from '@stdlib/types/iter'; type Iterator = Iter | IterableIterator; /** -* Iterator function +* Iterator function. * * @param iterator - input iterator * @param args - function arguments -* @returns hash value +* @returns iterator function result */ type IteratorFunction = ( iterator: Iterator, ...args: Array ) => any; diff --git a/lib/node_modules/@stdlib/iter/replicate-by/docs/types/index.d.ts b/lib/node_modules/@stdlib/iter/replicate-by/docs/types/index.d.ts index 2e485ea4e49a..09c950fcf6b6 100644 --- a/lib/node_modules/@stdlib/iter/replicate-by/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/iter/replicate-by/docs/types/index.d.ts @@ -70,7 +70,7 @@ type Ternary = ( value: any, index: number, n: number ) => number; type Callback = Nullary | Unary | Binary | Ternary; /** -* Returns an iterator which invokes a function for each iterated value. +* Returns an iterator which replicates each iterated value according to a provided function. * * ## Notes * diff --git a/lib/node_modules/@stdlib/iter/strided/docs/types/index.d.ts b/lib/node_modules/@stdlib/iter/strided/docs/types/index.d.ts index b0d2b53408ea..b5062a9b3d4c 100644 --- a/lib/node_modules/@stdlib/iter/strided/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/iter/strided/docs/types/index.d.ts @@ -35,7 +35,7 @@ type Iterator = Iter | IterableIterator; * @param iterator - input iterator * @param stride - stride * @param offset - offset -* @param eager - boolean indicating whether to eagerly advance an input iterator when provided a non-zero `offset` +* @param eager - boolean indicating whether to eagerly advance an input iterator when provided a non-zero `offset` (default: false) * @returns iterator * * @example