[wp-trac] [WordPress Trac] #44520: Fix default parameters in controls.js JSDoc.

WordPress Trac noreply at wordpress.org
Thu Jul 5 13:10:46 UTC 2018


#44520: Fix default parameters in controls.js JSDoc.
------------------------------+-----------------------------
 Reporter:  herregroen        |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Customize         |    Version:  trunk
 Severity:  normal            |   Keywords:  has-patch
  Focuses:  javascript, docs  |
------------------------------+-----------------------------
 While JSDoc technically supports the `@param {string=} optional` or
 `@param {string=} [optional]` style of setting optional parameters.

 It does unfortunately not support `@param {string=default} optional` or
 `@param {string=default} [optional]` style of default parameters.

 Instead, as the JSDoc standards recommend, the following should be used:
 `@param {string} [optional]` or `@param {string} [optional=default]`.

 `src/js/_enqueues/wp/customize/controls.js` still contains several
 notations of the incorrect style.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44520>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list