Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class expressions are not supported #434

Open
nnmrts opened this issue Dec 21, 2023 · 0 comments
Open

class expressions are not supported #434

nnmrts opened this issue Dec 21, 2023 · 0 comments

Comments

@nnmrts
Copy link

nnmrts commented Dec 21, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant