docs(engine.io): improve JSDoc completeness in server.ts #5422
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.
The kind of change this PR does introduce
Current behavior
The file packages/engine.io/lib/server.ts contains several incomplete or inaccurate JSDoc blocks:
Some methods such as onWebTransportSession() and init() had no JSDoc at all
Some JSDoc blocks were missing @returns tags
Some parameters were missing type information
Several docblocks used incorrect or generic types (Object, string, etc.)
Grammar and clarity issues in existing docblocks
A few descriptions did not accurately reflect the behavior of the method
These inconsistencies reduce overall readability and make TypeScript tooling and editor intellisense less helpful.
New behavior
This PR improves the JSDoc completeness and accuracy within server.ts:
Added full JSDoc block for onWebTransportSession()
Improved JSDoc for attach() (corrected parameter types, added @returns)
Added missing @returns to abortRequest()
Corrected parameter types in multiple docblocks
Improved grammar and clarity in method descriptions
Ensured consistent formatting and sentence punctuation
No functional or behavioral changes were introduced.
Other information (e.g. related issues)
This PR focuses entirely on documentation quality, improving readability and maintainability inside the Engine.IO server code.
There are no related issues.
よろしくお願いします!