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

[api-documenter] Add new showInheritedMembers config for api-documenter and new api-documenter-scenarios test project #3543

Merged
merged 11 commits into from
Jul 21, 2022

Conversation

zelliott
Copy link
Contributor

Summary

Fixes #3429. #3469 includes the api-extractor-model changes necessary to support showing an item's inherited members. This PR includes the work in api-documenter to actually show an item's inherited members.

(See zelliott#3 for old PR on fork).

Details

How it was tested

Ran rush rebuild and manually inspected generated Markdown artifacts.

@zelliott
Copy link
Contributor Author

zelliott commented Jul 20, 2022

From Zulip:

I'd like some special attention given to the IFindApiItemMessages. I imagine that these messages need to be generic across all "find operations", so I avoided mentioning "inherited members" in any of them.

Is there a way to test these messages? I don't see any code that actually reads IFindApiItemsResult.messages. Maybe the API Documenter test could write it to a file or something? Or maybe at least do a manual test with console.log() to make sure it's printing the display name and not undefined or somesuch.

I added some logic to api-documenter that logs out the messages and manually inspected that they made sense. They all made sense except surprisingly the ExtendsClassLikeVariable declaration in the api-documenter-scenarios test case reported a DeclarationResolutionFailed message instead of an UnsupportedKind message. This is because the canonical reference for ClassLikeVariable is incorrect, causing declaration resolution to fail (feel free to take a look at the .api.json). So all WAI at the end of the day.

@zelliott zelliott force-pushed the inheritance-docs-api-documenter branch from 3e0d3e7 to 3580cf1 Compare July 20, 2022 23:36
@zelliott zelliott changed the title [api-documenter] Add new showInheritedMembers config for api-documenter and new api-documenter-scenarios test project [api-documenter] Add new showInheritedMembers config for api-documenter and new api-documenter-scenarios test project Jul 20, 2022
@octogonz
Copy link
Collaborator

Before merging, we'll test this by regenerating the Rush Stack API reference.

@octogonz
Copy link
Collaborator

octogonz commented Jul 21, 2022

Here's the branch that I tested with:

microsoft/rushstack-websites@767d2a7...octogonz/api-docs-test

The output is deployed to the live site: https://api.rushstack.io/pages/

Example of a class with inherited members: https://api.rushstack.io/pages/ts-command-line.commandlineparser/

@octogonz octogonz merged commit 4077079 into microsoft:main Jul 21, 2022
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

Successfully merging this pull request may close these issues.

[api-documenter] Show a class/interface declaration's inherited members
2 participants