So, let's say we have some code:
/** * Object implementation of the matrix. * * @class Table */ class Table { /** * Creates an instance of Table. * * @param {Array.<number[]>} matrix - Inital matrix * * @memberof Table */ constructor(matrix) { matrix.forEach((row, rowNum, matrix) => { this[rowNum] = []; matrix.forEach((value, colNum, row) => { this[rowNum][colNum] = new Cell(value); }) }) debugger } } /** * Object implementation of the matrix cell. * * @class Cell */ class Cell { /** * Creates an instance of Cell. * @param {number} value * * @memberof Cell */ constructor(value) { // Some code } } let table = new Table([ [0, 1, 1, 0], [0, 1, 1, 0], [0, 1, 1, 0], [0, 1, 1, 0] ]); console.log(table); If you call the constructor of the Table class, it returns an object with an arbitrary number of properties whose names are numbers from 0 to the dimension of the input matrix. The value of each such property will be an array of values of type {Cell} .
How to explain this to the JSDoc interpreter?
Honestly, even there are no thoughts, which side to take.