Skip to content

chore(act): jsdoc consistency pass#655

Merged
Rotorsoft merged 1 commit into
masterfrom
chore/jsdoc-consistency
May 4, 2026
Merged

chore(act): jsdoc consistency pass#655
Rotorsoft merged 1 commit into
masterfrom
chore/jsdoc-consistency

Conversation

@Rotorsoft
Copy link
Copy Markdown
Owner

Summary

JSDoc audit on the libs/act public surface caught two real bugs and a handful of fills.

Real bugs (orphaned JSDoc blocks)

  • types/errors.tsConcurrencyError's JSDoc was stacked above StreamClosedError's JSDoc, but the actual ConcurrencyError class was declared after StreamClosedError. TypeDoc/IDE happily attached the StreamClosedError JSDoc to itself and orphaned ConcurrencyError's, so the ConcurrencyError class ended up undocumented in the generated API ref. Reordered so each class is adjacent to its JSDoc.
  • act.ts — the Act constructor JSDoc sat above six private field declarations (each with their own JSDoc), so it attached to the first private field instead of the constructor. Moved it down to be adjacent to the constructor and expanded it slightly to point callers at the act() builder.

Fills

  • adapters/in-memory-cache@inheritDoc on get/set/invalidate/clear/dispose so TypeDoc picks up the Cache interface contract; brief one-liner on the size getter.
  • adapters/console-logger@inheritDoc on child(); explanatory one-liner on the no-op dispose().
  • types/registry — expanded the terse one-line JSDoc on ReactionsRegister and SchemaRegister with intent + template params.

Verified clean

  • pnpm test — 67 files, 995 tests passing
  • eslint on the touched files — no errors
  • tsc --noEmit on libs/act — clean

Test plan

  • Generate the typedoc output (pnpm -F docs build:all or pnpm typedoc in libs/act) and confirm ConcurrencyError and the Act constructor now show their JSDoc in the API reference

Two real bugs found by audit (orphaned JSDoc blocks attaching to the
wrong declaration):

- types/errors.ts: ConcurrencyError JSDoc was stacked above
  StreamClosedError's JSDoc, but the actual ConcurrencyError class
  was declared *after* StreamClosedError. TypeDoc/IDE attached the
  StreamClosedError JSDoc to itself and orphaned ConcurrencyError's,
  leaving the ConcurrencyError class undocumented. Reorder so
  ConcurrencyError sits adjacent to its JSDoc, then StreamClosedError.
- act.ts: Act constructor JSDoc was placed above six private field
  declarations (each with their own JSDoc), so it attached to the
  first private field instead of the constructor. Move it down to
  sit adjacent to the constructor and expand it slightly to point
  callers at the act() builder.

Smaller fills:

- adapters/in-memory-cache: add @inheritdoc on get/set/invalidate/
  clear/dispose so TypeDoc picks up the Cache interface contract;
  brief one-liner on the size getter
- adapters/console-logger: add @inheritdoc on child(); explanatory
  one-liner on the no-op dispose()
- types/registry: expand the terse one-line JSDoc on
  ReactionsRegister and SchemaRegister with intent + template params

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Rotorsoft Rotorsoft merged commit 1181efe into master May 4, 2026
4 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

🎉 This PR is included in version @rotorsoft/act-v0.33.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant