jsduck: Clean up odd use of @returns instead of @return
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 6 Mar 2014 15:08:47 +0000 (16:08 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 6 Mar 2014 15:08:47 +0000 (16:08 +0100)
The fast majority in core uses @return, a handful were using
@returns though (which works because JSDuck supports it as alias
for @return).

Also cleaned up minor things in touched areas:
* Hoist second description for jQuery.matchSrcSet (there can only
  be one, it was currently interpreted as continuation of the
  @return caption).
* Remove redundant @method.

Change-Id: I15d1d023f0424e38c58a252139e6bb2f0b36d2b4

resources/jquery/jquery.client.js
resources/jquery/jquery.hidpi.js
resources/jquery/jquery.localize.js
resources/mediawiki/mediawiki.js

index 4c6a7ac..6689b7c 100644 (file)
@@ -20,7 +20,7 @@
                 *
                 * @param {Object} nav An object with atleast a 'userAgent' and 'platform' key.
                 * Defaults to the global Navigator object.
-                * @returns {Object} The resulting client object will be in the following format:
+                * @return {Object} The resulting client object will be in the following format:
                 *  {
                 *   'name': 'firefox',
                 *   'layout': 'gecko',
                 * @param {boolean} [exactMatchOnly=false] Only return true if the browser is matched, otherwise
                 * returns true if the browser is not found.
                 *
-                * @returns {boolean} The current browser is in the support map
+                * @return {boolean} The current browser is in the support map
                 */
                test: function ( map, profile, exactMatchOnly ) {
                        /*jshint evil: true */
index 70bfc4e..eb29db9 100644 (file)
@@ -16,8 +16,7 @@
  *
  * Uses window.devicePixelRatio if available, or CSS media queries on IE.
  *
- * @method
- * @returns {number} Device pixel ratio
+ * @return {number} Device pixel ratio
  */
 $.devicePixelRatio = function () {
        if ( window.devicePixelRatio !== undefined ) {
@@ -51,8 +50,7 @@ $.devicePixelRatio = function () {
  * Implement responsive images based on srcset attributes, if browser has no
  * native srcset support.
  *
- * @method
- * @returns {jQuery} This selection
+ * @return {jQuery} This selection
  */
 $.fn.hidpi = function () {
        var $target = this,
@@ -81,11 +79,11 @@ $.fn.hidpi = function () {
 /**
  * Match a srcset entry for the given device pixel ratio
  *
+ * Exposed for testing.
+ *
  * @param {number} devicePixelRatio
  * @param {string} srcset
  * @return {mixed} null or the matching src string
- *
- * Exposed for testing.
  */
 $.matchSrcSet = function ( devicePixelRatio, srcset ) {
        var candidates,
index d9a2b19..e0d9de2 100644 (file)
@@ -9,7 +9,7 @@
  *
  * @param {Object} options
  * @param {string} key
- * @returns {string} Localized message
+ * @return {string} Localized message
  */
 function msg( options, key ) {
        var args = options.params[key] || [];
index a7c946d..597f396 100644 (file)
@@ -381,7 +381,7 @@ var mw = ( function ( $, undefined ) {
                 * values with microsecond precision that are guaranteed to be monotonic. On all other browsers,
                 * it will fall back to using `Date`.
                 *
-                * @returns {number} Current time
+                * @return {number} Current time
                 */
                now: ( function () {
                        var perf = window.performance,