Merge pull request #3433 from orblazer/fix-types

Fix "any" types
This commit is contained in:
Richard Davey 2018-03-20 16:28:43 +00:00 committed by GitHub
commit 28206e872f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 93 additions and 93 deletions

View file

@ -11,7 +11,7 @@
* @since 3.0.0
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {any} hitArea - [description]
* @param {*} hitArea - [description]
* @param {HitAreaCallback} hitAreaCallback - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.

View file

@ -56,7 +56,7 @@ var BaseCache = new Class({
* @event Phaser.Cache.BaseCache#addEvent
* @param {Phaser.Cache.BaseCache} The BaseCache to which the object was added.
* @param {string} The key of the object added to the cache.
* @param {any} A reference to the object added to the cache.
* @param {*} A reference to the object added to the cache.
*/
/**
@ -68,7 +68,7 @@ var BaseCache = new Class({
* @since 3.0.0
*
* @param {string} key - The unique key by which the data added to the cache will be referenced.
* @param {any} data - The data to be stored in the cache.
* @param {*} data - The data to be stored in the cache.
*
* @return {Phaser.Cache.BaseCache} This BaseCache object.
*/
@ -88,7 +88,7 @@ var BaseCache = new Class({
* @since 3.0.0
*
* @param {string} key - The unique key of the item to be checked in this cache.
*
*
* @return {boolean} Returns `true` if the cache contains an item matching the given key, otherwise `false`.
*/
has: function (key)
@ -103,8 +103,8 @@ var BaseCache = new Class({
* @since 3.0.0
*
* @param {string} key - The unique key of the item to be retrieved from this cache.
*
* @return {any} The item in the cache, or `null` if no item matching the given key was found.
*
* @return {*} The item in the cache, or `null` if no item matching the given key was found.
*/
get: function (key)
{
@ -119,7 +119,7 @@ var BaseCache = new Class({
* @event Phaser.Cache.BaseCache#removeEvent
* @param {Phaser.Cache.BaseCache} The BaseCache from which the object was removed.
* @param {string} The key of the object removed from the cache.
* @param {any} The object that was removed from the cache.
* @param {*} The object that was removed from the cache.
*/
/**

View file

@ -9,9 +9,9 @@ var Class = require('../utils/Class');
/**
* @callback DataEachCallback
*
* @param {any} parent - [description]
* @param {*} parent - [description]
* @param {string} key - [description]
* @param {any} value - [description]
* @param {*} value - [description]
* @param {...*} [arguments] - Additional arguments that will be passed to the callback, after the game object, key, and data.
*/
@ -26,7 +26,7 @@ var Class = require('../utils/Class');
* @constructor
* @since 3.0.0
*
* @param {any} parent - [description]
* @param {*} parent - [description]
* @param {EventEmitter} eventEmitter - [description]
*/
var DataManager = new Class({
@ -39,7 +39,7 @@ var DataManager = new Class({
* [description]
*
* @name Phaser.Data.DataManager#parent
* @type {any}
* @type {*}
* @since 3.0.0
*/
this.parent = parent;
@ -100,7 +100,7 @@ var DataManager = new Class({
*
* @param {string} key - [description]
*
* @return {any} [description]
* @return {*} [description]
*/
get: function (key)
{
@ -162,7 +162,7 @@ var DataManager = new Class({
* @since 3.0.0
*
* @param {string} key - [description]
* @param {any} data - [description]
* @param {*} data - [description]
*
* @return {Phaser.Data.DataManager} This DataManager object.
*/
@ -293,7 +293,7 @@ var DataManager = new Class({
*
* @param {string} key - [description]
*
* @return {any} [description]
* @return {*} [description]
*/
pop: function (key)
{

View file

@ -20,7 +20,7 @@ var _disableContextSmoothing = false;
* before a Phaser.Game instance has even been created.
* Which means all instances of Phaser Games on the same page
* can share the one single pool
*
*
* @namespace Phaser.Display.Canvas.CanvasPool
* @since 3.0.0
*/
@ -31,12 +31,12 @@ var CanvasPool = function ()
*
* @function Phaser.Display.Canvas.CanvasPool.create
* @since 3.0.0
*
* @param {any} parent - The parent of the Canvas object.
*
* @param {*} parent - The parent of the Canvas object.
* @param {integer} [width=1] - The width of the Canvas.
* @param {integer} [height=1] - The height of the Canvas.
* @param {integer} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.
*
*
* @return {HTMLCanvasElement} [description]
*/
var create = function (parent, width, height, canvasType)
@ -74,7 +74,7 @@ var CanvasPool = function ()
{
Smoothing.disable(canvas.getContext('2d'));
}
return canvas;
};
@ -83,11 +83,11 @@ var CanvasPool = function ()
*
* @function Phaser.Display.Canvas.CanvasPool.create2D
* @since 3.0.0
*
* @param {any} parent - The parent of the Canvas object.
*
* @param {*} parent - The parent of the Canvas object.
* @param {integer} [width=1] - The width of the Canvas.
* @param {integer} [height=1] - The height of the Canvas.
*
*
* @return {HTMLCanvasElement} [description]
*/
var create2D = function (parent, width, height)
@ -100,11 +100,11 @@ var CanvasPool = function ()
*
* @function Phaser.Display.Canvas.CanvasPool.createWebGL
* @since 3.0.0
*
* @param {any} parent - The parent of the Canvas object.
*
* @param {*} parent - The parent of the Canvas object.
* @param {integer} [width=1] - The width of the Canvas.
* @param {integer} [height=1] - The height of the Canvas.
*
*
* @return {HTMLCanvasElement} [description]
*/
var createWebGL = function (parent, width, height)
@ -117,9 +117,9 @@ var CanvasPool = function ()
*
* @function Phaser.Display.Canvas.CanvasPool.first
* @since 3.0.0
*
*
* @param {integer} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.
*
*
* @return {HTMLCanvasElement} [description]
*/
var first = function (canvasType)
@ -143,8 +143,8 @@ var CanvasPool = function ()
*
* @function Phaser.Display.Canvas.CanvasPool.remove
* @since 3.0.0
*
* @param {any} parent - [description]
*
* @param {*} parent - [description]
*/
var remove = function (parent)
{
@ -168,7 +168,7 @@ var CanvasPool = function ()
*
* @function Phaser.Display.Canvas.CanvasPool.total
* @since 3.0.0
*
*
* @return {integer} [description]
*/
var total = function ()
@ -191,7 +191,7 @@ var CanvasPool = function ()
*
* @function Phaser.Display.Canvas.CanvasPool.free
* @since 3.0.0
*
*
* @return {integer} [description]
*/
var free = function ()

View file

@ -211,7 +211,7 @@ var GameObject = new Class({
* @since 3.0.0
*
* @param {string} key - The key of the property to be stored.
* @param {any} value - The value to store with the key. Can be a string, number, array or object.
* @param {*} value - The value to store with the key. Can be a string, number, array or object.
*
* @return {Phaser.GameObjects.GameObject} This GameObject.
*/
@ -235,7 +235,7 @@ var GameObject = new Class({
*
* @param {string} key - The key of the property to be retrieved.
*
* @return {any} The data, if present in the Data Store.
* @return {*} The data, if present in the Data Store.
*/
getData: function (key)
{
@ -253,7 +253,7 @@ var GameObject = new Class({
* @method Phaser.GameObjects.GameObject#setInteractive
* @since 3.0.0
*
* @param {any} [shape] - A geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.
* @param {*} [shape] - A geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.
* @param {HitAreaCallback} [callback] - A callback to be invoked when the Game Object is interacted with.
* @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?
*

View file

@ -423,7 +423,7 @@ var ParticleEmitter = new Class({
* [description]
*
* @name Phaser.GameObjects.Particles.ParticleEmitter#emitCallbackScope
* @type {?any}
* @type {?*}
* @default null
* @since 3.0.0
*/
@ -443,7 +443,7 @@ var ParticleEmitter = new Class({
* [description]
*
* @name Phaser.GameObjects.Particles.ParticleEmitter#deathCallbackScope
* @type {?any}
* @type {?*}
* @default null
* @since 3.0.0
*/
@ -1548,7 +1548,7 @@ var ParticleEmitter = new Class({
* @since 3.0.0
*
* @param {ParticleEmitterCallback} callback - [description]
* @param {any} [context] - [description]
* @param {*} [context] - [description]
*
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
*/
@ -1580,7 +1580,7 @@ var ParticleEmitter = new Class({
* @since 3.0.0
*
* @param {ParticleDeathCallback} callback - [description]
* @param {any} [context] - [description]
* @param {*} [context] - [description]
*
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
*/
@ -1633,7 +1633,7 @@ var ParticleEmitter = new Class({
* @since 3.0.0
*
* @param {ParticleEmitterCallback} callback - [description]
* @param {any} thisArg - [description]
* @param {*} thisArg - [description]
*
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
*/
@ -1658,7 +1658,7 @@ var ParticleEmitter = new Class({
* @since 3.0.0
*
* @param {ParticleEmitterCallback} callback - [description]
* @param {any} thisArg - [description]
* @param {*} thisArg - [description]
*
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
*/

View file

@ -9,7 +9,7 @@
/**
* @callback HitAreaCallback
*
* @param {any} hitArea - [description]
* @param {*} hitArea - [description]
* @param {number} x - [description]
* @param {number} y - [description]
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
@ -26,7 +26,7 @@
* @property {boolean} dropZone - [description]
* @property {[type]} target - [description]
* @property {Phaser.Cameras.Scene2D.Camera} camera - [description]
* @property {any} hitArea - [description]
* @property {*} hitArea - [description]
* @property {HitAreaCallback} hitAreaCallback - [description]
* @property {number} localX - [description]
* @property {number} localY - [description]
@ -44,7 +44,7 @@
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {any} hitArea - [description]
* @param {*} hitArea - [description]
* @param {HitAreaCallback} hitAreaCallback - [description]
*
* @return {InteractiveObject} [description]

View file

@ -173,7 +173,7 @@ var File = new Class({
* The processed file data, stored in here after the file has loaded.
*
* @name Phaser.Loader.File#data
* @type {any}
* @type {*}
* @since 3.0.0
*/
this.data = undefined;

View file

@ -812,7 +812,7 @@ var LoaderPlugin = new Class({
* @method Phaser.Loader.LoaderPlugin#saveJSON
* @since 3.0.0
*
* @param {any} data - [description]
* @param {*} data - [description]
* @param {string} [filename=file.json] - [description]
*
* @return {Phaser.Loader.LoaderPlugin} This Loader plugin.
@ -828,7 +828,7 @@ var LoaderPlugin = new Class({
* @method Phaser.Loader.LoaderPlugin#save
* @since 3.0.0
*
* @param {any} data - [description]
* @param {*} data - [description]
* @param {string} [filename=file.json] - [description]
* @param {string} [filetype=application/json] - [description]
*

View file

@ -177,7 +177,7 @@ var RandomDataGenerator = new Class({
* @method Phaser.Math.RandomDataGenerator#sow
* @since 3.0.0
*
* @param {any[]} seeds - The array of seeds: the `toString()` of each value is used.
* @param {*[]} seeds - The array of seeds: the `toString()` of each value is used.
*/
sow: function (seeds)
{
@ -339,7 +339,7 @@ var RandomDataGenerator = new Class({
*
* @param {array} array - The array to pick a random element from.
*
* @return {any} A random member of the array.
* @return {*} A random member of the array.
*/
pick: function (array)
{
@ -367,7 +367,7 @@ var RandomDataGenerator = new Class({
*
* @param {array} array - The array to pick a random element from.
*
* @return {any} A random member of the array.
* @return {*} A random member of the array.
*/
weightedPick: function (array)
{

View file

@ -1701,7 +1701,7 @@ var World = new Class({
* @method Phaser.Physics.Arcade.World#wrap
* @since 3.3.0
*
* @param {any} object - A Game Object, a Group, an object with `x` and `y` coordinates, or an array of such objects.
* @param {*} object - A Game Object, a Group, an object with `x` and `y` coordinates, or an array of such objects.
* @param {number} [padding=0] - An amount added to each boundary edge during the operation.
*/
wrap: function (object, padding)
@ -1731,7 +1731,7 @@ var World = new Class({
* @method Phaser.Physics.Arcade.World#wrapArray
* @since 3.3.0
*
* @param {any[]} arr
* @param {*[]} arr
* @param {number} [padding=0] - An amount added to the boundary.
*/
wrapArray: function (arr, padding)
@ -1753,7 +1753,7 @@ var World = new Class({
* @method Phaser.Physics.Arcade.World#wrapObject
* @since 3.3.0
*
* @param {any} object - A Game Object, a Physics Body, or any object with `x` and `y` coordinates
* @param {*} object - A Game Object, a Physics Body, or any object with `x` and `y` coordinates
* @param {number} [padding=0] - An amount added to the boundary.
*/
wrapObject: function (object, padding)

View file

@ -506,7 +506,7 @@ var SceneManager = new Class({
* @method Phaser.Scenes.SceneManager#render
* @since 3.0.0
*
* @param {any} renderer - [description]
* @param {*} renderer - [description]
*/
render: function (renderer)
{

View file

@ -9,7 +9,7 @@ var Class = require('../utils/Class');
/**
* @callback EachListCallback
*
* @param {any} item - [description]
* @param {*} item - [description]
* @param {...*} [arguments] - Additional arguments that will be passed to the callback, after the child.
*/
@ -22,7 +22,7 @@ var Class = require('../utils/Class');
* @constructor
* @since 3.0.0
*
* @param {any} parent - [description]
* @param {*} parent - [description]
*/
var List = new Class({
@ -34,7 +34,7 @@ var List = new Class({
* The parent of this list.
*
* @name Phaser.Structs.List#parent
* @type {any}
* @type {*}
* @since 3.0.0
*/
this.parent = parent;
@ -224,9 +224,9 @@ var List = new Class({
* @since 3.0.0
*
* @param {string} property - The property to check against the value.
* @param {any} value - The value to check if the property strictly equals.
* @param {*} value - The value to check if the property strictly equals.
*
* @return {any} The item that was found, or null if nothing matched.
* @return {*} The item that was found, or null if nothing matched.
*/
getByKey: function (property, value)
{
@ -251,7 +251,7 @@ var List = new Class({
*
* @param {string} name - The name to search for.
*
* @return {any} The first child with a matching name, or null if none were found.
* @return {*} The first child with a matching name, or null if none were found.
*/
getByName: function (name)
{
@ -267,7 +267,7 @@ var List = new Class({
* @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.
*
* @return {any} A random child of this Group.
* @return {*} A random child of this Group.
*/
getRandom: function (startIndex, length)
{
@ -291,11 +291,11 @@ var List = new Class({
* @since 3.0.0
*
* @param {string} property - [description]
* @param {any} value - [description]
* @param {*} value - [description]
* @param {number} [startIndex=0] - [description]
* @param {number} [endIndex] - [description]
*
* @return {any} [description]
* @return {*} [description]
*/
getFirst: function (property, value, startIndex, endIndex)
{
@ -330,7 +330,7 @@ var List = new Class({
* @since 3.0.0
*
* @param {string} [property] - An optional property to test against the value argument.
* @param {any} [value] - If property is set then Child.property must strictly equal this value to be included in the results.
* @param {*} [value] - If property is set then Child.property must strictly equal this value to be included in the results.
* @param {integer} [startIndex=0] - The first child index to start the search from.
* @param {integer} [endIndex] - The last child index to search up until.
*
@ -370,7 +370,7 @@ var List = new Class({
* @since 3.0.0
*
* @param {string} property - [description]
* @param {any} value - [description]
* @param {*} value - [description]
*
* @return {integer} [description]
*/
@ -725,7 +725,7 @@ var List = new Class({
* @since 3.0.0
*
* @param {string} key - [description]
* @param {any} value - [description]
* @param {*} value - [description]
*/
setAll: function (key, value)
{

View file

@ -10,7 +10,7 @@ var Class = require('../utils/Class');
* @callback EachMapCallback
*
* @param {string} key - [description]
* @param {any} entry - [description]
* @param {*} entry - [description]
*
* @return {?boolean} [description]
*/
@ -73,7 +73,7 @@ var Map = new Class({
* @since 3.0.0
*
* @param {string} key - [description]
* @param {any} value - [description]
* @param {*} value - [description]
*
* @return {Phaser.Structs.Map} This Map object.
*/
@ -96,7 +96,7 @@ var Map = new Class({
*
* @param {string} key - [description]
*
* @return {any} [description]
* @return {*} [description]
*/
get: function (key)
{
@ -271,7 +271,7 @@ var Map = new Class({
* @method Phaser.Structs.Map#contains
* @since 3.0.0
*
* @param {any} value - [description]
* @param {*} value - [description]
*
* @return {boolean} [description]
*/

View file

@ -72,7 +72,7 @@ var ProcessQueue = new Class({
* @method Phaser.Structs.ProcessQueue#add
* @since 3.0.0
*
* @param {any} item - [description]
* @param {*} item - [description]
*
* @return {Phaser.Structs.ProcessQueue} This Process Queue object.
*/
@ -91,7 +91,7 @@ var ProcessQueue = new Class({
* @method Phaser.Structs.ProcessQueue#remove
* @since 3.0.0
*
* @param {any} item - [description]
* @param {*} item - [description]
*
* @return {Phaser.Structs.ProcessQueue} This Process Queue object.
*/

View file

@ -9,7 +9,7 @@ var Class = require('../utils/Class');
/**
* @callback EachSetCallback
*
* @param {any} entry - [description]
* @param {*} entry - [description]
* @param {number} index - [description]
*
* @return {?boolean} [description]
@ -57,7 +57,7 @@ var Set = new Class({
* @method Phaser.Structs.Set#set
* @since 3.0.0
*
* @param {any} value - [description]
* @param {*} value - [description]
*
* @return {Phaser.Structs.Set} This Set object.
*/
@ -78,9 +78,9 @@ var Set = new Class({
* @since 3.0.0
*
* @param {string} property - [description]
* @param {any} value - [description]
* @param {*} value - [description]
*
* @return {any} [description]
* @return {*} [description]
*/
get: function (property, value)
{
@ -114,7 +114,7 @@ var Set = new Class({
* @method Phaser.Structs.Set#delete
* @since 3.0.0
*
* @param {any} value - [description]
* @param {*} value - [description]
*
* @return {Phaser.Structs.Set} This Set object.
*/
@ -286,7 +286,7 @@ var Set = new Class({
* @method Phaser.Structs.Set#contains
* @since 3.0.0
*
* @param {any} value - [description]
* @param {*} value - [description]
*
* @return {boolean} [description]
*/

View file

@ -154,7 +154,7 @@ var TextureManager = new Class({
* @since 3.0.0
*
* @param {string} key - The unique string-based key of the Texture.
* @param {any} data - The Base64 encoded data.
* @param {*} data - The Base64 encoded data.
*/
addBase64: function (key, data)
{

View file

@ -12,7 +12,7 @@
* @since 3.0.0
*
* @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.
* @param {any} xml - The XML data.
* @param {*} xml - The XML data.
*
* @return {Phaser.Textures.Texture} The Texture modified by this parser.
*/

View file

@ -12,9 +12,9 @@
*
* @param {object} source - [description]
* @param {string} key - [description]
* @param {any} defaultValue - [description]
* @param {*} defaultValue - [description]
*
* @return {any} [description]
* @return {*} [description]
*/
var GetBoolean = function (source, key, defaultValue)
{

View file

@ -12,7 +12,7 @@
*
* @param {object} source - [description]
* @param {string} key - [description]
* @param {any} defaultValue - [description]
* @param {*} defaultValue - [description]
*
* @return {function} [description]
*/

View file

@ -26,7 +26,7 @@ function hasGetters (def)
* @since 3.0.0
*
* @param {string} key - [description]
* @param {any} propertyValue - [description]
* @param {*} propertyValue - [description]
*
* @return {function} [description]
*/

View file

@ -374,7 +374,7 @@ var Tween = new Class({
* @since 3.0.0
*
* @param {string} key - [description]
* @param {any} value - [description]
* @param {*} value - [description]
* @param {boolean} startToCurrent - [description]
*
* @return {Phaser.Tweens.Tween} This Tween object.

View file

@ -14,7 +14,7 @@
* @param {array} array - The array to shift to the left. This array is modified in place.
* @param {integer} [total=1] - The number of times to shift the array.
*
* @return {any} The most recently shifted element.
* @return {*} The most recently shifted element.
*/
var RotateLeft = function (array, total)
{

View file

@ -14,7 +14,7 @@
* @param {array} array - The array to shift to the right. This array is modified in place.
* @param {integer} [total=1] - The number of times to shift the array.
*
* @return {any} The most recently shifted element.
* @return {*} The most recently shifted element.
*/
var RotateRight = function (array, total)
{

View file

@ -15,7 +15,7 @@
* @param {array} array - [description]
* @param {integer} index - [description]
*
* @return {any} [description]
* @return {*} [description]
*/
var SpliceOne = function (array, index)
{

View file

@ -42,9 +42,9 @@ var GetValue = require('./GetValue');
*
* @param {object} source - [description]
* @param {string} key - [description]
* @param {any} defaultValue - [description]
* @param {*} defaultValue - [description]
*
* @return {any} [description]
* @return {*} [description]
*/
var GetAdvancedValue = function (source, key, defaultValue)
{

View file

@ -16,9 +16,9 @@
*
* @param {object} source - [description]
* @param {string} key - [description]
* @param {any} defaultValue - [description]
* @param {*} defaultValue - [description]
*
* @return {any} [description]
* @return {*} [description]
*/
var GetFastValue = function (source, key, defaultValue)
{

View file

@ -16,9 +16,9 @@
*
* @param {object} source - [description]
* @param {string} key - [description]
* @param {any} defaultValue - [description]
* @param {*} defaultValue - [description]
*
* @return {any} [description]
* @return {*} [description]
*/
var GetValue = function (source, key, defaultValue)
{