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

Nested object type descriptions are not included in the output #2555

Open
xuhdev opened this issue Apr 26, 2024 · 3 comments
Open

Nested object type descriptions are not included in the output #2555

xuhdev opened this issue Apr 26, 2024 · 3 comments
Labels
bug Functionality does not match expectation good first issue Easier issue for first time contributors help wanted Contributions are especially encouraged

Comments

@xuhdev
Copy link
Contributor

xuhdev commented Apr 26, 2024

Search terms

nested object

Expected Behavior

Descriptions of nested object types should be generated in the output.

Actual Behavior

Descriptions of nested object types are not generated in the output.

Steps to reproduce the bug

  1. Write the following file:
/**
 *
 * @param props - Component properties.
 * @param props.title - Title.
 * @param props.options - Options.
 * @param props.options.featureA - Turn on or off featureA.
 * @param props.options.featureB - Turn on or off featureB.
 */
function ComponentWithOptions({
  title,
  options,
}: {
  title: string;
  options: { featureA: boolean; featureB: boolean };
}) {}
  1. Invoke typedoc on the file.
  2. The output looks like the following:

image

Note the descriptions of featureA and featureB are completely missing.

Environment

  • Typedoc version: 0.25.13
  • TypeScript version: 5.4.5
  • Node.js version: 20.12.2
  • OS: Debian
@xuhdev xuhdev added the bug Functionality does not match expectation label Apr 26, 2024
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 27, 2024

This is controlled by

// Moves tags like `@param foo.bar docs for bar` into the `bar` property of the `foo` parameter.
function moveNestedParamTags(
/* in-out */ paramTags: CommentTag[],
parameters: ParameterReflection[],
) {

@Gerrit0 Gerrit0 added help wanted Contributions are especially encouraged good first issue Easier issue for first time contributors labels Apr 27, 2024
@pastelsky
Copy link

@Gerrit0 what is needed to be done here? I can try and give this a shot.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented May 9, 2024

The function that I linked to above is what's responsible for moving @param comments, it currently only does one level deep, so it needs to be updated to be recursive or some other way too handle dotted name paths that are more than one deep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation good first issue Easier issue for first time contributors help wanted Contributions are especially encouraged
Projects
None yet
Development

No branches or pull requests

3 participants