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

ReadOnly JSDoc Tag Not Enforced in JSON Serialization #281

Open
RueDeRennes opened this issue Jul 24, 2024 · 0 comments
Open

ReadOnly JSDoc Tag Not Enforced in JSON Serialization #281

RueDeRennes opened this issue Jul 24, 2024 · 0 comments

Comments

@RueDeRennes
Copy link

The items property (which is a property in my WebComponent class) is annotated with the @readonly JSDoc tag but is still serialized without the readonly modifier afterwards in the JSON file. I’m using the --format json2 flag.
Is there any other way to make the read-only modifier available in the JSON file?

// ......

/**
 * Gets or sets the `items` property.
 *
 * @public
 * @readonly <- it should be readonly but is missing in the generated json file.
 */
public get items(): Array<HTMLElement> {
    return this._slot?.assignedElements() as Array<HTMLElement> ?? [];
}

// ......
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