From eece489c4b078b130d9fbd12d85c29c3f791baa9 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Tue, 2 Jun 2026 17:33:30 -0500 Subject: [PATCH 1/2] docs: fix TSDoc issues in several `@stdlib/math/iter` declarations Correct documentation-only issues in the TypeScript declaration files flagged by an audit of the `@stdlib/math/iter` namespace: - `sequences/nonpositive-even-integers`: the `iter` option `@throws` said "nonpositive integer"; `iter` is an iteration count, so it must be "nonnegative integer" (matching every sibling sequence package and the package's own `lib/validate.js`). - `special/ahaversin`: "versed sin" -> "versed sine" in the summary and Notes. - `tools/map`: add the non-numeric/`NaN` handling Notes bullet that the sibling `map2`/`map3` declarations include. - `special/acoth`: spell out the infinity notation in the domain note (`(-infinity,-1]`, `[1,+infinity)`) to match the sibling `acosh`. This PR addresses only the TypeScript declaration files. (Two further `iter` findings -- `special/pow` "exponential function" -> "power function" and the `sequences/integers` default value -- are package-wide and handled in a separate PR.) --- 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 --- --- .../sequences/nonpositive-even-integers/docs/types/index.d.ts | 2 +- .../@stdlib/math/iter/special/acoth/docs/types/index.d.ts | 2 +- .../@stdlib/math/iter/special/ahaversin/docs/types/index.d.ts | 4 ++-- .../@stdlib/math/iter/tools/map/docs/types/index.d.ts | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/math/iter/sequences/nonpositive-even-integers/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/iter/sequences/nonpositive-even-integers/docs/types/index.d.ts index 4b43e55d6886..70d93b28027e 100644 --- a/lib/node_modules/@stdlib/math/iter/sequences/nonpositive-even-integers/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/iter/sequences/nonpositive-even-integers/docs/types/index.d.ts @@ -44,7 +44,7 @@ interface Options { * * @param options - function options * @param options.iter - number of iterations (default: 4503599627370497) -* @throws `iter` option must be a nonpositive integer +* @throws `iter` option must be a nonnegative integer * @returns iterator * * @example diff --git a/lib/node_modules/@stdlib/math/iter/special/acoth/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/iter/special/acoth/docs/types/index.d.ts index 29077868940a..fa17863e4f3c 100644 --- a/lib/node_modules/@stdlib/math/iter/special/acoth/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/iter/special/acoth/docs/types/index.d.ts @@ -30,7 +30,7 @@ type Iterator = Iter | IterableIterator; * * ## Notes * -* - The domain of inverse hyperbolic cotangent is restricted to `(-inf,-1]` and `[1,inf)`. If an iterated value is outside of the domain, the returned iterator returns `NaN`. +* - The domain of inverse hyperbolic cotangent is restricted to `(-infinity,-1]` and `[1,+infinity)`. If an iterated value is outside of the domain, the returned iterator returns `NaN`. * - If an environment supports `Symbol.iterator` **and** a provided iterator is iterable, the returned iterator is iterable. * * @param iterator - input iterator diff --git a/lib/node_modules/@stdlib/math/iter/special/ahaversin/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/iter/special/ahaversin/docs/types/index.d.ts index ee3c27eec8e3..fe538895b6c3 100644 --- a/lib/node_modules/@stdlib/math/iter/special/ahaversin/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/iter/special/ahaversin/docs/types/index.d.ts @@ -26,11 +26,11 @@ import { Iterator as Iter, IterableIterator } from '@stdlib/types/iter'; type Iterator = Iter | IterableIterator; /** -* Returns an iterator which iteratively computes the inverse half-value versed sin. +* Returns an iterator which iteratively computes the inverse half-value versed sine. * * ## Notes * -* - The domain of inverse half-value versed sin is restricted to `[0,1]`. If an iterated value is outside of the domain, the returned iterator returns `NaN`. +* - The domain of inverse half-value versed sine is restricted to `[0,1]`. If an iterated value is outside of the domain, the returned iterator returns `NaN`. * - If an environment supports `Symbol.iterator` **and** a provided iterator is iterable, the returned iterator is iterable. * * @param iterator - input iterator diff --git a/lib/node_modules/@stdlib/math/iter/tools/map/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/iter/tools/map/docs/types/index.d.ts index aebf219b1d59..baaccfb4bac7 100644 --- a/lib/node_modules/@stdlib/math/iter/tools/map/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/iter/tools/map/docs/types/index.d.ts @@ -52,6 +52,8 @@ type Unary = ( value: number ) => any; * * - `value`: iterated value * +* - If an iterated value is non-numeric (including `NaN`), the returned iterator returns `NaN`. If non-numeric iterated values are possible, you are advised to provide an iterator which type checks and handles non-numeric values accordingly. +* * - If an environment supports `Symbol.iterator` **and** a provided iterator is iterable, the returned iterator is iterable. * * @param iterator - input iterator From cfc3559e0ec584fddc74cb99f89b049f64d73cd9 Mon Sep 17 00:00:00 2001 From: Athan Date: Wed, 3 Jun 2026 01:05:37 -0700 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- .../@stdlib/math/iter/tools/map/docs/types/index.d.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/node_modules/@stdlib/math/iter/tools/map/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/iter/tools/map/docs/types/index.d.ts index baaccfb4bac7..aebf219b1d59 100644 --- a/lib/node_modules/@stdlib/math/iter/tools/map/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/iter/tools/map/docs/types/index.d.ts @@ -52,8 +52,6 @@ type Unary = ( value: number ) => any; * * - `value`: iterated value * -* - If an iterated value is non-numeric (including `NaN`), the returned iterator returns `NaN`. If non-numeric iterated values are possible, you are advised to provide an iterator which type checks and handles non-numeric values accordingly. -* * - If an environment supports `Symbol.iterator` **and** a provided iterator is iterable, the returned iterator is iterable. * * @param iterator - input iterator