docs: fix incorrect JSDoc in public APIs#8612
Merged
Merged
Conversation
Made-with: Cursor
Contributor
There was a problem hiding this comment.
Pull request overview
Docs-only PR correcting a handful of objectively incorrect / misleading JSDoc annotations and examples in public-facing APIs (no runtime behavior changes).
Changes:
- Corrected
CalculateSortDistanceCallbackto document a numeric return value used for sorting. - Widened
Compute#getParameterdocumented return union to includeTextureView(matchingsetParameter). - Fixed typos/grammar in several public JSDoc blocks and repaired a broken
@exampletemplate-literal log.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/scene/mesh-instance.js | Fixes callback return type docs for sort-distance calculation. |
| src/scene/graph-node.js | Fixes multiple typos/grammar in find* / tag-query JSDoc and examples. |
| src/platform/graphics/compute.js | Updates getParameter JSDoc return union to include TextureView. |
| src/framework/script/script-type.js | Clarifies legacy ScriptType class summary wording in JSDoc. |
| src/framework/i18n/i18n.js | Removes duplicated “when when” in locale-change event JSDoc. |
| src/extras/gizmo/transform-gizmo.js | Fixes duplicated “when when” and corrects @example to use a template literal. |
| src/extras/gizmo/gizmo.js | Removes duplicated “when when” in render-update event JSDoc. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Apr 19, 2026
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
Docs-only PR fixing a small set of objectively-wrong JSDoc issues in public-facing APIs. No runtime behaviour changes.
Type corrections
CalculateSortDistanceCallbackinsrc/scene/mesh-instance.js: was documented as@returns {void}, butLayer#_calculateSortDistancesuses the result as a numeric sort distance. Corrected to@returns {number}.Compute#getParameterinsrc/platform/graphics/compute.js: return union was missingTextureView, which is an allowed value persetParameter. Added to the union.Typos / grammar in public JSDoc prose
src/scene/graph-node.js:findByNameparam described "the name of the graph" -> "the name of the node".find/findOnesaid "the valued passed" -> "the value passed".findOne@returns"A graph node that match" -> "that matches".findByTagdescription "each tag of array" -> "each tag of the array"; examples "nodes that tagged by" -> "nodes tagged with" (and fixed "assets" -> "graph nodes" for accuracy).src/framework/script/script-type.js: class summary rewritten from "You should not use this inherit from this class directly." to "Do not inherit from this class directly.", and fixed missing article.src/extras/gizmo/transform-gizmo.js(2 sites),src/extras/gizmo/gizmo.js, andsrc/framework/i18n/i18n.js.Broken @example
TransformGizmo.EVENT_TRANSFORMMOVEexample used${...}inside single quotes, so it logged literal${pointDelta}. Converted to a backtick template literal.Public API changes
Only JSDoc types change; no runtime signatures change. Two documented types are widened:
Before:
After:
Before:
After:
Test plan
npx eslinton all touched files passes.