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

docgen: pull type definitions from @typedef #15186

Closed
oandregal opened this issue Apr 25, 2019 · 3 comments
Closed

docgen: pull type definitions from @typedef #15186

oandregal opened this issue Apr 25, 2019 · 3 comments
Labels
[Package] Docgen /packages/docgen [Type] Enhancement A suggestion for improvement.

Comments

@oandregal
Copy link
Member

There are a few places in the codebase where we document our custom types. We should have a way to document them and use them in other symbols' docs.

@oandregal
Copy link
Member Author

A good use case for this is the block-editor' SETTINGS_DEFAULTS (related discussion).

@aduth
Copy link
Member

aduth commented Dec 9, 2019

Prior art: In a recent side-project I worked on, I was fortunate to reference the REST API documentation of Mixer.com. One nice thing about it is that, for each "Request" or "Response" overview, any custom type will link to the relevant description and properties (example), which can be recursive as well for custom types within those properties.

For docgen, I might imagine something similar. The automated documentation can produce two sections:

  1. Functions (or "public/exported members" generally)
  2. Types

For each function description, if a parameter or return type is a custom type, it should link to the relevant type description on the same page.

We will need to find some appropriate way to distinguish between types internal to the package itself, vs. types imported from other WordPress packages (link to the relevant README), vs. types imported from third-party packages (link to...their GitHub/npm listing?)

@oandregal
Copy link
Member Author

I'm triagging issues we don't plan to tackle. We can reopen if it regains interest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Docgen /packages/docgen [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants