I have a class that defines several properties of an instance through Object.defineProperties, and it is very difficult for me to get JSDoc 3 to recognize that they belong to their class.
Here is a simplified version of what I'm working with:
function mymodule(exports) {
function Example(foo, bar) {
Object.defineProperties(this, {
foobar: { enumerable: false, value: foo + bar, writable: false }
});
}
exports.Example = Example;
}
When I run JSDoc, I get a conclusion for mymodule, Example, fooand bar, but not foobar. If I remove the tag @memberoffor foobar, it will be registered as global. I tried @memberof mymmodule~Exampleadding @lendsto the call Object.definePropertiesand the object passed to it, and converted it to Object.defineProperty, but the results are not changed.
How can I document foobaras belonging Example?