jsdoc
jsdoc copied to clipboard
Class only inherits one of overloaded functions
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 |
It does not appear to be the template causing this problem. It still behaves this way without a template.