jsdoc / jsdoc/jsdoc

ES2015 class properties should be documented when @hideconstructor is used

Open
#1,515 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
15.5k
Forks
1.5k
Avg merge
10d 23h
Merged PRs (30d)
1

Description

If @hideconstructor is present in an ES2015 constructor JSDoc comment the Constructor section and calling instructions are removed as expected.

However, any @property documentation from the class JSDoc comment also appears to be removed, which seems wrong as these document "instance"-related concepts that are independent of whether the constructor is part of the public API.

I propose that the properties table should be emitted in the context of the class documentation, and only @param values associated with the constructor be placed in the constructor section.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how ES2015 class JSDoc comments are rendered when @hideconstructor is present. Check the generated output for the class properties table, constructor section, calling instructions, and constructor @param values. Done means class @property documentation remains in the class documentation while only constructor parameters stay in the constructor section.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.