deno_doc icon indicating copy to clipboard operation
deno_doc copied to clipboard

class expressions are not supported

Open nnmrts opened this issue 2 years ago • 0 comments

While this is supported and docs for it generate fine:

class Square extends Rectangle {
	constructor({width}) {
		super({width, height: width});
	}
}

This syntax doesn't seem to be supported and the docs generated for it say it is a "variable" and not a class:

const Square = class extends Rectangle {
	constructor({width}) {
		super({width, height: width});
	}
};

Note that JSDoc supports both class declarations and expressions: https://jsdoc.app/howto-es2015-classes

nnmrts avatar Dec 21 '23 21:12 nnmrts