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

Documentation of function parameters that utilize destructuring #604

Open
ezzatron opened this issue Jun 12, 2024 · 1 comment
Open

Documentation of function parameters that utilize destructuring #604

ezzatron opened this issue Jun 12, 2024 · 1 comment
Labels
docs gen Related to the documentation generation upstream Issue is in upstream project

Comments

@ezzatron
Copy link

I have a function with this definition:

/**
 * Transforms a vector by a matrix.
 *
 * @param r - A transformation matrix.
 * @param v - A vector.
 *
 * @returns The transformed vector.
 */
export function transform(
  [[r11, r12, r13], [r21, r22, r23], [r31, r32, r33]]: Matrix,
  [x, y, z]: Vector,
): Vector {
  return [
    r11 * x + r12 * y + r13 * z,
    r21 * x + r22 * y + r23 * z,
    r31 * x + r32 * y + r33 * z,
  ];
}

I generate TSDoc documentation from this, which you can see correctly associates the @param tag with the parameters that use destructuring:

Screenshot 2024-06-12 at 10 00 42

However, JSR fails to make the same association, and documents these parameters as "unnamed":

Screenshot 2024-06-12 at 10 02 10
@github-project-automation github-project-automation bot moved this to Needs Triage in JSR Jun 12, 2024
@ezzatron
Copy link
Author

ezzatron commented Jul 5, 2024

After digging around in the source, I think this is probably actually an upstream issue in deno doc: denoland/deno_doc#574

@lucacasonato lucacasonato added bug docs gen Related to the documentation generation labels Jul 12, 2024
@crowlKats crowlKats removed the bug label Jan 16, 2025
@crowlKats crowlKats moved this from Needs Triage to Ready in JSR Jan 16, 2025
@crowlKats crowlKats added the upstream Issue is in upstream project label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs gen Related to the documentation generation upstream Issue is in upstream project
Projects
Status: Ready
Development

No branches or pull requests

3 participants