jsdoc/jsdoc.github.io

Dynamically setting type of @param based on value of another @param

h2plucifer opened this issue · 0 comments

Hi ,
CI have following enum values :

/**

/**

Above enum values are used as type of @param as follows :
/**
* @method getAllClasses
* @activity getAllClasses (serviceName)
* @description Gets all the classes of the service
* @mode positional
* @param {enum.$.enums.services} serviceName service name
* @param {enum.$.enums.serviceName} serviceClass name
* @return {*} classList
*/
getAllClasses(serviceName) {
let classes = Object.getOwnPropertyNames(serviceName);
return classes;
};

Currently I am trying to utilize value of First @param as the type of 2nd @param (so based on serviceName value type of 2nd @param should be set).

But this approach currently not working for me.

Please let me know how the type of 2nd @param can be set dynamically based on the value of serviceName (in first @param)

Thanks