Skip to content

docs: fix TSDoc errors in @stdlib/assert declarations#12454

Open
Planeshifter wants to merge 1 commit into
developfrom
philipp/docs-assert-ts-declaration-fixes
Open

docs: fix TSDoc errors in @stdlib/assert declarations#12454
Planeshifter wants to merge 1 commit into
developfrom
philipp/docs-assert-ts-declaration-fixes

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

@Planeshifter Planeshifter commented Jun 2, 2026

Description

What is the purpose of this pull request?

This pull request corrects documentation-only defects (TSDoc comments only; no type or runtime changes) across @stdlib/assert ambient declaration files:

  • Fixes copy-pasted/wrong @returns and summary prose: is-symbol-array ("array of strings" -> symbols), is-probability-array ("positive integer" -> probabilities), is-undefined-or-null (omitted "or null"), is-nonpositive-number-array ("integer" -> "number"), and is-nonpositive-finite (missing "finite").
  • Fixes incorrect @example annotations: is-positive-finite (Infinity marked "returns true"), is-iterable-like (placeholder // returns <boolean>), and is-nan-array (missing // returns).
  • In is-bigint and is-symbol, demonstrates the main function in the top-level @example blocks (previously only sub-methods were shown) while retaining .isPrimitive/.isObject examples, and removes a duplicated @example block.
  • Repairs HasFunction summaries/examples in deep-has-own-property and deep-has-property to describe the returned one-argument tester.
  • Miscellaneous: strips JSDoc-style {*}/{boolean} tags in is-nonnegative-finite, converts backtick example strings to single quotes in is-kebabcase, gives continuation examples their own @example tags in is-startcase, adds the missing ## Notes block in is-same-typed-array-like, and removes stray/double whitespace.

Related Issues

Does this pull request have any related issues?

No.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request?

Identified via a TypeScript-declaration audit of the @stdlib/assert namespace. Non-documentation (type/signature) fixes are submitted as separate pull requests. The auto-generated namespace aggregator declaration (docs/types/index.d.ts) is intentionally left untouched.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was authored primarily by Claude Code (Anthropic's CLI), which audited the @stdlib/assert TypeScript declarations and proposed and applied the documentation fixes. I reviewed the changes.


@stdlib-js/reviewers

@Planeshifter Planeshifter requested a review from a team June 2, 2026 16:42
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jun 2, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

stdlib-bot commented Jun 2, 2026

Coverage Report

Package Statements Branches Functions Lines
assert/contains $\color{green}155/155$
$\color{green}+0.00\%$
$\color{green}18/18$
$\color{green}+0.00\%$
$\color{green}1/1$
$\color{green}+0.00\%$
$\color{green}155/155$
$\color{green}+0.00\%$
assert/deep-has-own-property $\color{green}438/438$
$\color{green}+0.00\%$
$\color{green}47/47$
$\color{green}+0.00\%$
$\color{green}6/6$
$\color{green}+0.00\%$
$\color{green}438/438$
$\color{green}+0.00\%$
assert/deep-has-property $\color{green}454/454$
$\color{green}+0.00\%$
$\color{green}47/47$
$\color{green}+0.00\%$
$\color{green}6/6$
$\color{green}+0.00\%$
$\color{green}454/454$
$\color{green}+0.00\%$
assert/is-bigint $\color{green}327/327$
$\color{green}+0.00\%$
$\color{green}17/17$
$\color{green}+0.00\%$
$\color{green}4/4$
$\color{green}+0.00\%$
$\color{green}327/327$
$\color{green}+0.00\%$
assert/is-boolean-array $\color{green}78/78$
$\color{green}+0.00\%$
$\color{green}1/1$
$\color{green}+0.00\%$
$\color{green}0/0$
$\color{green}+0.00\%$
$\color{green}78/78$
$\color{green}+0.00\%$
assert/is-integer-array $\color{green}82/82$
$\color{green}+0.00\%$
$\color{green}1/1$
$\color{green}+0.00\%$
$\color{green}0/0$
$\color{green}+0.00\%$
$\color{green}82/82$
$\color{green}+0.00\%$
assert/is-iterable-like $\color{green}120/120$
$\color{green}+0.00\%$
$\color{green}8/8$
$\color{green}+0.00\%$
$\color{green}1/1$
$\color{green}+0.00\%$
$\color{green}120/120$
$\color{green}+0.00\%$
assert/is-kebabcase $\color{green}101/101$
$\color{green}+0.00\%$
$\color{green}4/4$
$\color{green}+0.00\%$
$\color{green}1/1$
$\color{green}+0.00\%$
$\color{green}101/101$
$\color{green}+0.00\%$
assert/is-leap-year $\color{green}131/131$
$\color{green}+0.00\%$
$\color{green}12/12$
$\color{green}+0.00\%$
$\color{green}1/1$
$\color{green}+0.00\%$
$\color{green}131/131$
$\color{green}+0.00\%$
assert/is-nan-array $\color{green}73/73$
$\color{green}+0.00\%$
$\color{green}1/1$
$\color{green}+0.00\%$
$\color{green}0/0$
$\color{green}+0.00\%$
$\color{green}73/73$
$\color{green}+0.00\%$
assert/is-nonnegative-finite $\color{green}273/273$
$\color{green}+0.00\%$
$\color{green}10/10$
$\color{green}+0.00\%$
$\color{green}3/3$
$\color{green}+0.00\%$
$\color{green}273/273$
$\color{green}+0.00\%$
assert/is-nonpositive-finite $\color{green}213/213$
$\color{green}+0.00\%$
$\color{green}12/12$
$\color{green}+0.00\%$
$\color{green}3/3$
$\color{green}+0.00\%$
$\color{green}213/213$
$\color{green}+0.00\%$
assert/is-nonpositive-number-array $\color{green}76/76$
$\color{green}+0.00\%$
$\color{green}1/1$
$\color{green}+0.00\%$
$\color{green}0/0$
$\color{green}+0.00\%$
$\color{green}76/76$
$\color{green}+0.00\%$
assert/is-number-array $\color{green}76/76$
$\color{green}+0.00\%$
$\color{green}1/1$
$\color{green}+0.00\%$
$\color{green}0/0$
$\color{green}+0.00\%$
$\color{green}76/76$
$\color{green}+0.00\%$
assert/is-positive-finite $\color{green}263/263$
$\color{green}+0.00\%$
$\color{green}12/12$
$\color{green}+0.00\%$
$\color{green}3/3$
$\color{green}+0.00\%$
$\color{green}263/263$
$\color{green}+0.00\%$
assert/is-probability-array $\color{green}79/79$
$\color{green}+0.00\%$
$\color{green}1/1$
$\color{green}+0.00\%$
$\color{green}0/0$
$\color{green}+0.00\%$
$\color{green}79/79$
$\color{green}+0.00\%$
assert/is-readable-property $\color{green}130/130$
$\color{green}+0.00\%$
$\color{green}5/5$
$\color{green}+0.00\%$
$\color{green}1/1$
$\color{green}+0.00\%$
$\color{green}130/130$
$\color{green}+0.00\%$
assert/is-same-typed-array-like $\color{green}119/119$
$\color{green}+0.00\%$
$\color{green}5/5$
$\color{green}+0.00\%$
$\color{green}1/1$
$\color{green}+0.00\%$
$\color{green}119/119$
$\color{green}+0.00\%$
assert/is-startcase $\color{green}95/95$
$\color{green}+0.00\%$
$\color{green}4/4$
$\color{green}+0.00\%$
$\color{green}1/1$
$\color{green}+0.00\%$
$\color{green}95/95$
$\color{green}+0.00\%$
assert/is-symbol-array $\color{green}76/76$
$\color{green}+0.00\%$
$\color{green}1/1$
$\color{green}+0.00\%$
$\color{green}0/0$
$\color{green}+0.00\%$
$\color{green}76/76$
$\color{green}+0.00\%$
assert/is-symbol $\color{green}384/384$
$\color{green}+0.00\%$
$\color{green}20/20$
$\color{green}+0.00\%$
$\color{green}5/5$
$\color{green}+0.00\%$
$\color{green}384/384$
$\color{green}+0.00\%$
assert/is-undefined-or-null $\color{green}96/96$
$\color{green}+0.00\%$
$\color{green}4/4$
$\color{green}+0.00\%$
$\color{green}1/1$
$\color{green}+0.00\%$
$\color{green}96/96$
$\color{green}+0.00\%$

The above coverage report was generated for the changes in this PR.

@Planeshifter Planeshifter force-pushed the philipp/docs-assert-ts-declaration-fixes branch 2 times, most recently from c3b10c0 to 38da3a3 Compare June 2, 2026 16:54
Correct documentation-only defects across `@stdlib/assert` ambient
declaration files (TSDoc comments only; no type or runtime changes):

- Fix copy-pasted/wrong `@returns` and summary prose: `is-symbol-array`
  ("array of strings" -> symbols), `is-probability-array` ("positive
  integer" -> probabilities), `is-undefined-or-null` (omitted "or
  null"), `is-nonpositive-number-array` ("integer" -> "number"), and
  `is-nonpositive-finite` (missing "finite").
- Fix incorrect `@example` annotations: `is-positive-finite` (`Infinity`
  marked "returns true"), `is-iterable-like` (placeholder `<boolean>`),
  and `is-nan-array` (missing `// returns`).
- In `is-bigint` and `is-symbol`, demonstrate the main function in the
  top-level `@example` blocks (previously only sub-methods were shown)
  and remove a duplicated `@example` block.
- Repair `HasFunction` summaries/examples in `deep-has-own-property` and
  `deep-has-property` to describe the returned one-argument tester.
- Miscellaneous: strip JSDoc-style `{*}`/`{boolean}` tags in
  `is-nonnegative-finite`, convert backtick example strings to single
  quotes in `is-kebabcase`, give continuation examples their own
  `@example` tags in `is-startcase`, add the missing `## Notes` block in
  `is-same-typed-array-like`, and remove stray/double whitespace.

---
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
---
@Planeshifter Planeshifter force-pushed the philipp/docs-assert-ts-declaration-fixes branch from 38da3a3 to 60f5767 Compare June 2, 2026 16:56
@Planeshifter Planeshifter requested a review from kgryte June 2, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review A pull request which needs code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants