Skip to content

feat: automatically add @default ... to @Prop() jsdoc #6139

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

Closed
3 tasks done
johnjenkins opened this issue Feb 3, 2025 · 0 comments · Fixed by #6264
Closed
3 tasks done

feat: automatically add @default ... to @Prop() jsdoc #6139

johnjenkins opened this issue Feb 3, 2025 · 0 comments · Fixed by #6264
Labels
Good First Issue This is a good first issue for someone wantng to contribute to Stencil! Help Wanted

Comments

@johnjenkins
Copy link
Contributor

johnjenkins commented Feb 3, 2025

Prerequisites

Describe the Feature Request

Stencil could add a @default 'whatever' to a @Prop() jsdoc when it's able to derive the default value.

Describe the Use Case

It'd be a nice quality of life improvement :) - It makes life easier for consuming apps to know what the default is to stop redundancy.

Describe Preferred Solution

Stencil automatically adds @default ... when it detects a default value AND it doesn't find one set manually

Describe Alternatives

Manually adding @default ...

Related Code

No response

Additional Information

Stencil does something similar now for @readonly when a @Prop() only has a getter method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue This is a good first issue for someone wantng to contribute to Stencil! Help Wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants