4

I have a parameter that could simply be described as:

/**
 * @param {String} source
 */

source value can be only a set of predefined values, e.g. "youtube", "vimeo".

How to document the accepted range of source values?

Gajus
  • 69,002
  • 70
  • 275
  • 438
  • This does not seem to be possible. I have opened an issue on Github to discuss this limitation, https://github.com/jsdoc3/jsdoc/issues/1065. – Gajus Sep 10 '15 at 12:25
  • I think enums are the correct way to do this, but so far the tools don't seem to enforce anything. I just asked a related question: http://stackoverflow.com/questions/32634342 – Moby Disk Sep 17 '15 at 15:30
  • ENUM does not allow to describe individual values. Thats the biggest downside. – Gajus Sep 17 '15 at 15:32

0 Answers0