Class only inherits one of overloaded functions
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 15.5k
- Forks
- 1.5k
- Avg merge
- 10d 23h
- Merged PRs (30d)
- 1
Description
Input code
/** A generic shape. The base for all other shapes.
* @constructor
* @package
* @alias shapes.Shape
* @param {string} type - The shape type
*/
function Shape(type) {
// ...
/** Rotate the shape around its rotationPoint
* @param {number} rotation - The (absolute) rotation in degrees
*//**
* Rotate the shape around a given point (also sets the rotationPoint)
* @param {number} rotation - The (absolute) rotation in degrees
* @param {number} x - The x position, relative to the shape's position, to rotate around
* @param {number} y - The y position, relative to the shape's position, to rotate around
*//**
* Rotate the shape around a given point (also sets the rotationPoint)
* @param {number} rotation - The (absolute) rotation in degrees
* @param {Vector2d} point - The point (relative to the shape's position) to rotate around
*/
this.setRotation = (rotation, x, y) => {
// ...
}
}
/** A square shape
* @constructor
* @alias shapes.Square
* @extends shapes.Shape
* @param {number} x - The x position
* @param {number} y - The y position
* @param {number} size - The width/height of the square
*/
function Square(x, y, size) {
// ...
}
JSDoc configuration
{
"source": {
"include": ["gameify"]
},
"opts": {
"encoding": "utf8",
"destination": "out/",
"recurse": true,
"template": "./node_modules/foodoc/template",
"theme_opts": {
"theme": "dark"
}
},
"templates": {
"includeDate": true,
"dateFormat": "Do MMM YYYY",
"systemName": "Gameify",
"systemSummary": "A game library for Javascript Games.",
"systemLogo": "",
"systemColor": "#1db38b",
"copyright": "Gameify Copyright © 2022 Jesse Kreider. FooDoc Copyright © 2016 The contributors to the JSDoc3 and FooDoc projects.",
"linenums": true,
"collapseSymbols": false,
"inverseNav": true,
"inlineNav": false,
"outputSourceFiles": true,
"outputSourcePath": false,
"disablePackagePath": true,
"methodHeadingReturns": true,
"showTableOfContents": true,
"showAccessFilter": false,
"sort": "linenum, longname, version, since",
"search": true,
"stylesheets": [],
"scripts": []
}
}
JSDoc debug output
DEBUG: JSDoc 3.6.7 (Sat, 15 May 2021 01:24:54 GMT)
DEBUG: Environment info: {"env":{"conf":{"plugins":[],"recurseDepth":10,"source":{"includePattern":".+\\.js(doc|x)?$","excludePattern":"","include":["gameify"]},"sourceType":"module","tags":{"allowUnknownTags":true,"dictionaries":["jsdoc","closure"]},"templates":{"monospaceLinks":false,"cleverLinks":false,"includeDate":true,"dateFormat":"Do MMM YYYY","systemName":"Gameify","systemSummary":"A game library for Javascript Games.","systemLogo":"","systemColor":"#1db38b","copyright":"Gameify Copyright © 2022 Jesse Kreider. FooDoc Copyright © 2016 The contributors to the JSDoc3 and FooDoc projects.","linenums":true,"collapseSymbols":false,"inverseNav":true,"inlineNav":false,"outputSourceFiles":true,"outputSourcePath":false,"disablePackagePath":true,"methodHeadingReturns":true,"showTableOfContents":true,"showAccessFilter":false,"sort":"linenum, longname,
version, since","search":true,"stylesheets":[],"scripts":[]},"opts":{"encoding":"utf8","destination":"out/","recurse":true,"template":"./node_modules/foodoc/template","theme_opts":{"theme":"dark"}}},"opts":{"_":[],"configure":"jsdoc.json","debug":true,"encoding":"utf8","destination":"out/","recurse":true,"template":"./node_modules/foodoc/template","theme_opts":{"theme":"dark"}}}}
DEBUG: Parsing source files: ["H:\\projects\\gameify\\gameify\\gameify.js","H:\\projects\\gameify\\gameify\\scene.js","H:\\projects\\gameify\\gameify\\collision.js","H:\\projects\\gameify\\gameify\\vector.js","H:\\projects\\gameify\\gameify\\sprite.js"]
Parsing H:\projects\gameify\gameify\gameify.js ...
Parsing H:\projects\gameify\gameify\scene.js ...
Parsing H:\projects\gameify\gameify\collision.js ...
Parsing H:\projects\gameify\gameify\vector.js ...
Parsing H:\projects\gameify\gameify\sprite.js ...
DEBUG: Finished parsing source files.
DEBUG: Adding inherited symbols, mixins, and interface implementations...
DEBUG: Adding borrowed doclets...
DEBUG: Post-processing complete.
Generating output files...
Finished running in 2.10 seconds.
Expected behavior
The Square class inherits all of the overloads for the setRotation function

(Image shows the Shape class)
Current behavior
The shape class has all overloads (image above), but the square class inherits only the first overload of the function

(Image shows square class)
Your environment
| Software | Version |
|---|---|
| JSDoc | 3.6.7 |
| Node.js | 14.17.6 |
| npm | 6.14.15 |
| Operating system | Windows 10 |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with jsdoc.json and reproduce the Shape/Square example using JSDoc 3.6.7 against gameify.js, scene.js, collision.js, vector.js, and sprite.js. Inspect inheritance and overloaded-function processing, then verify that Square displays all setRotation overloads rather than only the first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- documentation, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100