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

jsii: inherit docs and tags from supertypes, even if hidden #510

Closed
rix0rrr opened this issue May 22, 2019 · 3 comments
Closed

jsii: inherit docs and tags from supertypes, even if hidden #510

rix0rrr opened this issue May 22, 2019 · 3 comments
Labels
closed-for-staleness effort/medium Medium work item – a couple days of effort feature-request A feature should be added or improved. p1

Comments

@rix0rrr
Copy link
Contributor

rix0rrr commented May 22, 2019

For maximum usability, we should be inheriting member docstrings (and doctags) from supertypes, even if they are not exported.

This reduces unnecessary typing for users.

We should only inherit for the constructor if the signature is the same.

@eladb
Copy link
Contributor

eladb commented May 23, 2019

Yes! I was even thinking that we should encourage/enforce not adding docstrings on overrides so that there's a single source of truth (and then we can duplicate them in the assembly).

@rix0rrr
Copy link
Contributor Author

rix0rrr commented Jun 5, 2019

So TypeScript does a bit of this already for us. If there are no docstrings on a member and there are docstrings on the member it inherits from, the compiler will feed us the right inherit docstring.

It does not work for constructors yet, nor does it work for merging doc blocks (for example, docs for arguments could be inherited from a parent while summary/remarks are taken from the current docstring).

@SomayaB SomayaB added the feature-request A feature should be added or improved. label Nov 18, 2019
@SomayaB SomayaB added documentation This is a problem with documentation. and removed documentation This is a problem with documentation. labels Jan 7, 2020
@RomainMuller RomainMuller added the effort/medium Medium work item – a couple days of effort label Jan 24, 2020
@RomainMuller RomainMuller removed their assignment Jun 24, 2021
@github-actions
Copy link
Contributor

This issue has not received any attention in 2 years. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness effort/medium Medium work item – a couple days of effort feature-request A feature should be added or improved. p1
Projects
None yet
Development

No branches or pull requests

4 participants