docs: fix url param JSDoc in ResourceHandler and ContainerHandler#8619
Merged
Conversation
Consolidate the separate `url.load` and `url.original` `@param` lines into a
single union-typed `@param {string | {load: string, original: string}} url`
entry. TypeDoc couldn't associate the sub-property `@param`s with the
`string|object` union and emitted "unused @param" warnings for `url.load` and
`url.original` on `ResourceHandler.load`, `ContainerHandler.load`, and
`RenderHandler.load` (inherited). The union type documents the two shapes
accurately and clears all six warnings.
Made-with: Cursor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates JSDoc for ResourceHandler.load and ContainerHandler.load to describe the accepted url parameter shapes using a single union-typed @param, avoiding TypeDoc “unused @param” warnings for sub-property params.
Changes:
- Replace
@param url.load/@param url.originalsub-property entries with a single union-typed@paramforurl. - Apply the same consolidated
urltype documentation to bothResourceHandlerandContainerHandler.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/framework/handlers/handler.js | Consolidates url JSDoc into a single union type for ResourceHandler.load. |
| src/framework/handlers/container.js | Mirrors the consolidated url JSDoc for ContainerHandler.load. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
Consolidate the separate
url.loadandurl.original@paramlines into a single union-typed@paramonResourceHandler.loadandContainerHandler.load. TypeDoc couldn't associate the sub-property@params with thestring|objectunion and emitted "unused @param" warnings for each. The union typestring | {load: string, original: string}describes both accepted shapes accurately.Clears all six warnings:
ContainerHandler.load@param "url.load" / "url.original"RenderHandler.load@param "url.load" / "url.original" (inherited)ResourceHandler.load@param "url.load" / "url.original"Test plan
npm run docs- the six targeted warnings are gone.ResourceHandler.load/ContainerHandler.loadpages.