diff --git a/src/gameobjects/DisplayList.js b/src/gameobjects/DisplayList.js index 67bef4f5d..a72dc6f4a 100644 --- a/src/gameobjects/DisplayList.js +++ b/src/gameobjects/DisplayList.js @@ -14,7 +14,7 @@ var StableSort = require('../utils/array/StableSort'); * [description] * * @class DisplayList - * @extends Phaser.Structs.List + * @extends Phaser.Structs.List. * @memberOf Phaser.GameObjects * @constructor * @since 3.0.0 diff --git a/src/gameobjects/components/ToJSON.js b/src/gameobjects/components/ToJSON.js index 7a014ab1b..a8f364b8a 100644 --- a/src/gameobjects/components/ToJSON.js +++ b/src/gameobjects/components/ToJSON.js @@ -6,7 +6,6 @@ /** * @typedef {object} JSONGameObject - * @generic {object} DATA - [data] * * @property {string} name - The name of this Game Object. * @property {string} type - A textual representation of this Game Object, i.e. `sprite`. diff --git a/src/structs/List.js b/src/structs/List.js index 0ac8e62d2..b3a52d102 100644 --- a/src/structs/List.js +++ b/src/structs/List.js @@ -8,7 +8,7 @@ var Class = require('../utils/Class'); /** * @callback EachListCallback - * @generic {*} I - [item] + * @generic I - [item] * * @param {*} item - [description] * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. @@ -18,8 +18,6 @@ var Class = require('../utils/Class'); * @classdesc * [description] * - * @generic T - * * @class List * @memberOf Phaser.Structs * @constructor @@ -245,7 +243,7 @@ var List = new Class({ * @since 3.0.0 * * @genericUse {T} - [value] - * @genericUse {?T} - [$return] + * @genericUse {T | null} - [$return] * * @param {string} property - The property to check against the value. * @param {*} value - The value to check if the property strictly equals. @@ -273,7 +271,7 @@ var List = new Class({ * @method Phaser.Structs.List#getByName * @since 3.0.0 * - * @genericUse {?T} - [$return] + * @genericUse {T | null} - [$return] * * @param {string} name - The name to search for. * @@ -290,7 +288,7 @@ var List = new Class({ * @method Phaser.Structs.List#getRandom * @since 3.0.0 * - * @genericUse {?T} - [$return] + * @genericUse {T | null} - [$return] * * @param {integer} [startIndex=0] - Offset from the front of the group (lowest child). * @param {integer} [length=(to top)] - Restriction on the number of values you want to randomly select from. @@ -319,7 +317,7 @@ var List = new Class({ * @since 3.0.0 * * @genericUse {T} - [value] - * @genericUse {?T} - [$return] + * @genericUse {T | null} - [$return] * * @param {string} property - [description] * @param {*} value - [description] @@ -578,6 +576,8 @@ var List = new Class({ * @method Phaser.Structs.List#removeAll * @since 3.0.0 * + * @genericUse {Phaser.Structs.List.} - [$return] + * * @return {Phaser.Structs.List} This List object. */ removeAll: function () @@ -598,7 +598,7 @@ var List = new Class({ * @method Phaser.Structs.List#bringToTop * @since 3.0.0 * - * @generic {T} O - [child,$return] + * @genericUse {T} - [child,$return] * * @param {*} child - [description] * @@ -621,7 +621,7 @@ var List = new Class({ * @method Phaser.Structs.List#sendToBack * @since 3.0.0 * - * @generic {T} O - [child,$return] + * @genericUse {T} - [child,$return] * * @param {*} child - [description] * @@ -644,7 +644,7 @@ var List = new Class({ * @method Phaser.Structs.List#moveUp * @since 3.0.0 * - * @generic {T} O - [child,$return] + * @genericUse {T} - [child,$return] * * @param {*} child - [description] * @@ -673,7 +673,7 @@ var List = new Class({ * @method Phaser.Structs.List#moveDown * @since 3.0.0 * - * @generic {T} O - [child,$return] + * @genericUse {T} - [child,$return] * * @param {*} child - [description] * @@ -702,6 +702,8 @@ var List = new Class({ * @method Phaser.Structs.List#reverse * @since 3.0.0 * + * @genericUse {Phaser.Structs.List.} - [$return] + * * @return {Phaser.Structs.List} This List object. */ reverse: function () @@ -717,6 +719,8 @@ var List = new Class({ * @method Phaser.Structs.List#shuffle * @since 3.0.0 * + * @genericUse {Phaser.Structs.List.} - [$return] + * * @return {Phaser.Structs.List} This List object. */ shuffle: function () @@ -738,7 +742,7 @@ var List = new Class({ * @method Phaser.Structs.List#replace * @since 3.0.0 * - * @generic {T} O - [oldChild,newChild,$return] + * @genericUse {T} - [oldChild,newChild,$return] * * @param {*} oldChild - The child in this List that will be replaced. * @param {*} newChild - The child to be inserted into this List. diff --git a/src/structs/Map.js b/src/structs/Map.js index 552af4339..5074acabd 100644 --- a/src/structs/Map.js +++ b/src/structs/Map.js @@ -8,7 +8,7 @@ var Class = require('../utils/Class'); /** * @callback EachMapCallback - * @generic {*} E - [entry] + * @generic E - [entry] * * @param {string} key - [description] * @param {E} entry - [description] @@ -30,8 +30,9 @@ var Class = require('../utils/Class'); * @constructor * @since 3.0.0 * - * @generic T - * @genericUse {T[]} - [elements] + * @generic K + * @generic V + * @genericUse {V[]} - [elements] * * @param {Array.<*>} elements - [description] */ @@ -44,7 +45,7 @@ var Map = new Class({ /** * [description] * - * @genericUse {Object.} - [$type] + * @genericUse {Object.} - [$type] * * @name Phaser.Structs.Map#entries * @type {Object.} @@ -78,7 +79,9 @@ var Map = new Class({ * @method Phaser.Structs.Map#set * @since 3.0.0 * - * @genericUse {T} - [value] + * @genericUse {K} - [key] + * @genericUse {V} - [value] + * @genericUse {Phaser.Structs.Map.} - [$return] * * @param {string} key - [description] * @param {*} value - [description] @@ -102,7 +105,8 @@ var Map = new Class({ * @method Phaser.Structs.Map#get * @since 3.0.0 * - * @genericUse {T} - [$return] + * @genericUse {K} - [key] + * @genericUse {V} - [$return] * * @param {string} key - [description] * @@ -122,7 +126,7 @@ var Map = new Class({ * @method Phaser.Structs.Map#getArray * @since 3.0.0 * - * @genericUse {T[]} - [$return] + * @genericUse {V[]} - [$return] * * @return {Array.<*>} [description] */ @@ -145,6 +149,8 @@ var Map = new Class({ * @method Phaser.Structs.Map#has * @since 3.0.0 * + * @genericUse {K} - [key] + * * @param {string} key - [description] * * @return {boolean} [description] @@ -160,6 +166,9 @@ var Map = new Class({ * @method Phaser.Structs.Map#delete * @since 3.0.0 * + * @genericUse {K} - [key] + * @genericUse {Phaser.Structs.Map.} - [$return] + * * @param {string} key - [description] * * @return {Phaser.Structs.Map} This Map object. @@ -181,6 +190,8 @@ var Map = new Class({ * @method Phaser.Structs.Map#clear * @since 3.0.0 * + * @genericUse {Phaser.Structs.Map.} - [$return] + * * @return {Phaser.Structs.Map} This Map object. */ clear: function () @@ -202,6 +213,8 @@ var Map = new Class({ * @method Phaser.Structs.Map#keys * @since 3.0.0 * + * @genericUse {K[]} - [$return] + * * @return {string[]} [description] */ keys: function () @@ -215,7 +228,7 @@ var Map = new Class({ * @method Phaser.Structs.Map#values * @since 3.0.0 * - * @genericUse {T[]} - [$return] + * @genericUse {V[]} - [$return] * * @return {Array.<*>} [description] */ @@ -260,7 +273,8 @@ var Map = new Class({ * @method Phaser.Structs.Map#each * @since 3.0.0 * - * @genericUse {EachMapCallback.} - [callback] + * @genericUse {EachMapCallback.} - [callback] + * @genericUse {Phaser.Structs.Map.} - [$return] * * @param {EachMapCallback} callback - [description] * @@ -287,7 +301,7 @@ var Map = new Class({ * @method Phaser.Structs.Map#contains * @since 3.0.0 * - * @genericUse {T} - [value] + * @genericUse {V} - [value] * * @param {*} value - [description] * @@ -316,6 +330,8 @@ var Map = new Class({ * @method Phaser.Structs.Map#merge * @since 3.0.0 * + * @genericUse {Phaser.Structs.Map.} - [map,$return] + * * @param {Phaser.Structs.Map} map - [description] * @param {boolean} [override=false] - [description] * diff --git a/src/structs/ProcessQueue.js b/src/structs/ProcessQueue.js index 7bbfaccc6..2cbc68969 100644 --- a/src/structs/ProcessQueue.js +++ b/src/structs/ProcessQueue.js @@ -81,6 +81,7 @@ var ProcessQueue = new Class({ * @since 3.0.0 * * @genericUse {T} - [item] + * @genericUse {Phaser.Structs.ProcessQueue.} - [$return] * * @param {*} item - [description] * @@ -102,6 +103,7 @@ var ProcessQueue = new Class({ * @since 3.0.0 * * @genericUse {T} - [item] + * @genericUse {Phaser.Structs.ProcessQueue.} - [$return] * * @param {*} item - [description] * diff --git a/src/structs/Set.js b/src/structs/Set.js index 14db532dd..e3cc3a9f9 100644 --- a/src/structs/Set.js +++ b/src/structs/Set.js @@ -8,7 +8,7 @@ var Class = require('../utils/Class'); /** * @callback EachSetCallback - * @generic {*} E - [entry] + * @generic E - [entry] * * @param {*} entry - [description] * @param {number} index - [description] @@ -64,6 +64,7 @@ var Set = new Class({ * @since 3.0.0 * * @genericUse {T} - [value] + * @genericUse {Phaser.Structs.Set.} - [$return] * * @param {*} value - [description] * @@ -127,6 +128,7 @@ var Set = new Class({ * @since 3.0.0 * * @genericUse {T} - [value] + * @genericUse {Phaser.Structs.Set.} - [$return] * * @param {*} value - [description] * @@ -172,6 +174,7 @@ var Set = new Class({ * @since 3.0.0 * * @genericUse {EachSetCallback.} - [callback] + * @genericUse {Phaser.Structs.Set.} - [$return] * * @param {EachSetCallback} callback - [description] * @param {*} callbackScope - [description] @@ -215,6 +218,7 @@ var Set = new Class({ * @since 3.0.0 * * @genericUse {EachSetCallback.} - [callback] + * @genericUse {Phaser.Structs.Set.} - [$return] * * @param {EachSetCallback} callback - [description] * @param {*} callbackScope - [description] @@ -256,6 +260,8 @@ var Set = new Class({ * @method Phaser.Structs.Set#iterateLocal * @since 3.0.0 * + * @genericUse {Phaser.Structs.Set.} - [$return] + * * @param {string} callbackKey - [description] * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. * @@ -289,6 +295,8 @@ var Set = new Class({ * @method Phaser.Structs.Set#clear * @since 3.0.0 * + * @genericUse {Phaser.Structs.Set.} - [$return] + * * @return {Phaser.Structs.Set} This Set object. */ clear: function () @@ -321,6 +329,8 @@ var Set = new Class({ * @method Phaser.Structs.Set#union * @since 3.0.0 * + * @genericUse {Phaser.Structs.Set.} - [set,$return] + * * @param {Phaser.Structs.Set} set - [description] * * @return {Phaser.Structs.Set} [description] @@ -348,6 +358,8 @@ var Set = new Class({ * @method Phaser.Structs.Set#intersect * @since 3.0.0 * + * @genericUse {Phaser.Structs.Set.} - [set,$return] + * * @param {Phaser.Structs.Set} set - [description] * * @return {Phaser.Structs.Set} [description] @@ -373,6 +385,8 @@ var Set = new Class({ * @method Phaser.Structs.Set#difference * @since 3.0.0 * + * @genericUse {Phaser.Structs.Set.} - [set,$return] + * * @param {Phaser.Structs.Set} set - [description] * * @return {Phaser.Structs.Set} [description]