Skip to content

Commit 512262b

Browse files
committed
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). - `special/pow`: the summary called the operation the "exponential function", but it computes `base^exponent`; reword to "power function (i.e., `base` raised to the power `exponent`)". - `special/ahaversin`: "versed sin" -> "versed sine" in the summary and Notes. - `sequences/integers`: the documented default `iter` value was off by two (`18014398509481984` -> `18014398509481982`, i.e. `FLOAT64_MAX_SAFE_INTEGER * 2`). - `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; the corresponding README/REPL prose can be synced separately. --- 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 ---
1 parent 34f9bab commit 512262b

6 files changed

Lines changed: 8 additions & 6 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ interface Options {
4343
* - If an environment supports `Symbol.iterator`, the returned iterator is iterable.
4444
*
4545
* @param options - function options
46-
* @param options.iter - number of iterations (default: 18014398509481984)
46+
* @param options.iter - number of iterations (default: 18014398509481982)
4747
* @throws `iter` option must be a nonnegative integer
4848
* @returns iterator
4949
*

lib/node_modules/@stdlib/math/iter/sequences/nonpositive-even-integers/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ interface Options {
4444
*
4545
* @param options - function options
4646
* @param options.iter - number of iterations (default: 4503599627370497)
47-
* @throws `iter` option must be a nonpositive integer
47+
* @throws `iter` option must be a nonnegative integer
4848
* @returns iterator
4949
*
5050
* @example

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type Iterator = Iter | IterableIterator;
3030
*
3131
* ## Notes
3232
*
33-
* - 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`.
33+
* - 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`.
3434
* - If an environment supports `Symbol.iterator` **and** a provided iterator is iterable, the returned iterator is iterable.
3535
*
3636
* @param iterator - input iterator

lib/node_modules/@stdlib/math/iter/special/ahaversin/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-
* Returns an iterator which iteratively computes the inverse half-value versed sin.
29+
* Returns an iterator which iteratively computes the inverse half-value versed sine.
3030
*
3131
* ## Notes
3232
*
33-
* - 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`.
33+
* - 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`.
3434
* - If an environment supports `Symbol.iterator` **and** a provided iterator is iterable, the returned iterator is iterable.
3535
*
3636
* @param iterator - input iterator

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

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

2828
/**
29-
* Returns an iterator which iteratively evaluates the exponential function.
29+
* Returns an iterator which iteratively evaluates the power function (i.e., `base` raised to the power `exponent`).
3030
*
3131
* ## Notes
3232
*

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ type Unary = ( value: number ) => any;
5252
*
5353
* - `value`: iterated value
5454
*
55+
* - 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.
56+
*
5557
* - If an environment supports `Symbol.iterator` **and** a provided iterator is iterable, the returned iterator is iterable.
5658
*
5759
* @param iterator - input iterator

0 commit comments

Comments
 (0)