denoland/deno_doc

class expressions are not supported

nnmrts opened this issue · 0 comments

nnmrts commented

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