Open
Description
Input code
/**
* Canvas
*
* @class Canvas
*/
class Canvas {
/**
* Creates an instance of Canvas.
* @returns {HTMLCanvasElement}
* @memberof Canvas
*/
constructor(width, height) {
const canvas = document.createElement('canvas');
canvas.width = width;
canvas.height = height;
return canvas;
}
};
Expected behavior
This is the js output, so I know this works.
const canvas = new Canvas(600, 800);
console.log(canvas.width); // 600
Current behavior
This is what happens when using a jsdoc plugin and hover over the width.
I would have expected the width to show that it's a number.
const canvas = new Canvas(600, 800);
console.log(canvas.width); // `undefined`
Metadata
Metadata
Assignees
Labels
No labels