fix: reposition orphaned JSDoc blocks in type-system.ts#1
Merged
Conversation
The ConnectOptions JSDoc block was orphaned — it sat above Verbosity's own JSDoc, so tooling attached Verbosity's block to Verbosity correctly while the ConnectOptions block floated loose. Move it directly above the ConnectOptions interface. Also merge the two adjacent JSDoc blocks on MergeInner into a single block so the description is not silently dropped by tooling that only reads the closest block. Addresses FINDING-06 from code review. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
feffef
commented
Apr 17, 2026
Owner
Author
feffef
left a comment
There was a problem hiding this comment.
Opus Reviewer (on behalf of @feffef): LGTM — would approve if GitHub allowed self-approval. Verified the diff is a pure JSDoc repositioning on src/type-system.ts only. The Verbosity block now sits directly above export type Verbosity (line 117), the ConnectOptions block sits directly above export interface ConnectOptions (line 136), and the two MergeInner JSDoc blocks have been merged into one (with @internal inside) immediately above export type MergeInner (line 321). No non-JSDoc content changed, no JSDoc content (examples, @param tags, @see refs) was lost, and only src/type-system.ts is touched — no scope creep. Matches Approach A exactly.
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.
Finding
FINDING-06 | WARNING | Style / Documentation
Location:
src/type-system.ts:107-123(orphaned),src/type-system.ts:302-321(duplicated)Two JSDoc blocks in
type-system.tswere misaligned:ConnectOptionsJSDoc block sat beforeVerbosity's own JSDoc, soVerbositygot documented correctly butConnectOptionswas left with no attached docstring — tooling like TypeDoc and editor hovers showed no description forConnectOptions, despite a correctly-written block existing just above.MergeInnerhad two adjacent JSDoc blocks. Tooling that attaches the closest-preceding block to a declaration silently dropped the description and kept only the@internaltag.Concrete impact: a consumer hovering over
ConnectOptionsin their IDE sees no documentation, even though the library maintains a hand-written block. A contributor reading generated API docs for the internalMergeInnerhelper sees only@internalwith no explanation of what the helper does.Approach chosen: A — Pure JSDoc repositioning
Minimal, zero-risk comment rearrangement. The fix re-homes the
ConnectOptionsblock and merges theMergeInnerpair.Alternatives considered
@seecross-refs: Add bi-directional@seetags betweenVerbosityandConnectOptions.errorVerbosity. Rejected becauseerrorVerbosityalready referencesVerbosity, so the extra cross-ref is noise.eslint-plugin-jsdocwith a rule that prevents orphaned blocks. Rejected because the project does not currently use ESLint; introducing a full lint dependency for a single class of issue is disproportionate.Test plan
npx jest— all existing tests pass (JSDoc-only change, no runtime effect)npm run typecheck— compilation succeedsReview checklist