Skip to content

Properties of values in an array are not parsed correctly past first level #658

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

Closed
delucis opened this issue Jan 13, 2017 · 1 comment
Closed

Comments

@delucis
Copy link

delucis commented Jan 13, 2017

The JSDoc documentation of @param outlines a method for documenting properties of objects in an array:

/**
 * Assign the project to a list of employees.
 * @param {Object[]} employees - The employees who are responsible for the project.
 * @param {string} employees[].name - The name of an employee.
 */

This renders correctly in documentation.js, but if the array is not at the highest level, I am getting incorrect output.

Here, the payload object contains two arrays of objects with peak and rms properties:

/**
 * Update blocks of server meters.
 *
 * @param {Object} state - current state in store
 * @param {Object} payload - server meters object to update
 * @param {Object[]} [payload.input_meter_levels] - array of peak & RMS values
 * @param {Number} [payload.input_meter_levels[].peak]
 * @param {Number} [payload.input_meter_levels[].rms]
 * @param {Object[]} [payload.output_meter_levels] - array of peak & RMS values
 * @param {Number} [payload.output_meter_levels[].peak]
 * @param {Number} [payload.output_meter_levels[].rms]
 */

And here’s the output I get:

documentation.js output

@tmcw
Copy link
Member

tmcw commented Apr 12, 2017

Thanks for the report! I'm going to merge this into #554, which is discussing the same problem.

@tmcw tmcw closed this as completed Apr 12, 2017
@tmcw tmcw added the duplicate label Apr 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants