chore(act): jsdoc consistency pass#655
Merged
Merged
Conversation
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>
|
🎉 This PR is included in version @rotorsoft/act-v0.33.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.ts—ConcurrencyError's JSDoc was stacked aboveStreamClosedError's JSDoc, but the actualConcurrencyErrorclass was declared afterStreamClosedError. 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— theActconstructor 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 theact()builder.Fills
adapters/in-memory-cache—@inheritDoconget/set/invalidate/clear/disposeso TypeDoc picks up theCacheinterface contract; brief one-liner on thesizegetter.adapters/console-logger—@inheritDoconchild(); explanatory one-liner on the no-opdispose().types/registry— expanded the terse one-line JSDoc onReactionsRegisterandSchemaRegisterwith intent + template params.Verified clean
pnpm test— 67 files, 995 tests passingeslinton the touched files — no errorstsc --noEmiton libs/act — cleanTest plan
pnpm -F docs build:allorpnpm typedocinlibs/act) and confirmConcurrencyErrorand theActconstructor now show their JSDoc in the API reference