refactor(collision): correct JSDoc visibility tags on internal methods#8888
Merged
Conversation
CollisionComponent was the only one of the 20 components tagging its onBeforeRemove lifecycle hook - every other component declares it bare, like onEnable/onDisable. The tag also made build:types emit the method as a private member in the published declarations while the other 19 are public. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e its param The method is called by CollisionComponentSystem from outside the class, so @ignore is the accurate tag - matching the base Component lifecycle hooks (onEnable, onSetEnabled, buildAccessors) that systems invoke. The @Private tag wrongly emitted it as a private member in the published declarations. Also replaces @param {*} with {object}, following the precedent set by RigidBodyComponent._getEntityTransform for Ammo-typed parameters. Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
Follow-up to the onBeforeRemove standardization in the component-consistency series. Two JSDoc visibility fixes in
CollisionComponent, both verified against the generated.d.ts:onBeforeRemove- drop the stray@privateCollision was the only one of the 20 components tagging its
onBeforeRemovelifecycle hook - every other component declares it bare, likeonEnable/onDisable. The tag also madebuild:typesemit the method as aprivatemember in the published declarations while the other 19 are public. It now emitsonBeforeRemove(): void;, identical to the rest.getCompoundChildShapeIndex-@private->@ignore, type the paramThe method is called by
CollisionComponentSystemfrom outside the class, so@privatewas inaccurate (and emitted aprivatemember in the.d.tsthat the system nonetheless calls).@ignorematches the convention set by the baseComponentclass for methods that systems invoke (onEnable,onSetEnabled,buildAccessors, etc.) - hidden from the API docs but public in the declarations. Also replaces@param {*}with{object}, following the precedent ofRigidBodyComponent._getEntityTransformfor Ammo-typed parameters. The declaration is nowgetCompoundChildShapeIndex(shape: object): number | null;.If we later want lifecycle hooks excluded from the generated API docs, that should be a uniform
@ignoresweep across all components rather than a one-off.Verified with
npm test,npm run lint,npm run build:types+npm run test:types.🤖 Generated with Claude Code