Skip to content

Commit 7fba122

Browse files
committed
Fix "any" types
1 parent 44103dc commit 7fba122

28 files changed

Lines changed: 93 additions & 93 deletions

File tree

src/actions/SetHitArea.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* @since 3.0.0
1212
*
1313
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
14-
* @param {any} hitArea - [description]
14+
* @param {*} hitArea - [description]
1515
* @param {HitAreaCallback} hitAreaCallback - [description]
1616
*
1717
* @return {array} The array of Game Objects that was passed to this Action.

src/cache/BaseCache.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var BaseCache = new Class({
5656
* @event Phaser.Cache.BaseCache#addEvent
5757
* @param {Phaser.Cache.BaseCache} The BaseCache to which the object was added.
5858
* @param {string} The key of the object added to the cache.
59-
* @param {any} A reference to the object added to the cache.
59+
* @param {*} A reference to the object added to the cache.
6060
*/
6161

6262
/**
@@ -68,7 +68,7 @@ var BaseCache = new Class({
6868
* @since 3.0.0
6969
*
7070
* @param {string} key - The unique key by which the data added to the cache will be referenced.
71-
* @param {any} data - The data to be stored in the cache.
71+
* @param {*} data - The data to be stored in the cache.
7272
*
7373
* @return {Phaser.Cache.BaseCache} This BaseCache object.
7474
*/
@@ -88,7 +88,7 @@ var BaseCache = new Class({
8888
* @since 3.0.0
8989
*
9090
* @param {string} key - The unique key of the item to be checked in this cache.
91-
*
91+
*
9292
* @return {boolean} Returns `true` if the cache contains an item matching the given key, otherwise `false`.
9393
*/
9494
has: function (key)
@@ -103,8 +103,8 @@ var BaseCache = new Class({
103103
* @since 3.0.0
104104
*
105105
* @param {string} key - The unique key of the item to be retrieved from this cache.
106-
*
107-
* @return {any} The item in the cache, or `null` if no item matching the given key was found.
106+
*
107+
* @return {*} The item in the cache, or `null` if no item matching the given key was found.
108108
*/
109109
get: function (key)
110110
{
@@ -119,7 +119,7 @@ var BaseCache = new Class({
119119
* @event Phaser.Cache.BaseCache#removeEvent
120120
* @param {Phaser.Cache.BaseCache} The BaseCache from which the object was removed.
121121
* @param {string} The key of the object removed from the cache.
122-
* @param {any} The object that was removed from the cache.
122+
* @param {*} The object that was removed from the cache.
123123
*/
124124

125125
/**

src/data/DataManager.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ var Class = require('../utils/Class');
99
/**
1010
* @callback DataEachCallback
1111
*
12-
* @param {any} parent - [description]
12+
* @param {*} parent - [description]
1313
* @param {string} key - [description]
14-
* @param {any} value - [description]
14+
* @param {*} value - [description]
1515
* @param {...*} [arguments] - Additional arguments that will be passed to the callback, after the game object, key, and data.
1616
*/
1717

@@ -26,7 +26,7 @@ var Class = require('../utils/Class');
2626
* @constructor
2727
* @since 3.0.0
2828
*
29-
* @param {any} parent - [description]
29+
* @param {*} parent - [description]
3030
* @param {EventEmitter} eventEmitter - [description]
3131
*/
3232
var DataManager = new Class({
@@ -39,7 +39,7 @@ var DataManager = new Class({
3939
* [description]
4040
*
4141
* @name Phaser.Data.DataManager#parent
42-
* @type {any}
42+
* @type {*}
4343
* @since 3.0.0
4444
*/
4545
this.parent = parent;
@@ -100,7 +100,7 @@ var DataManager = new Class({
100100
*
101101
* @param {string} key - [description]
102102
*
103-
* @return {any} [description]
103+
* @return {*} [description]
104104
*/
105105
get: function (key)
106106
{
@@ -162,7 +162,7 @@ var DataManager = new Class({
162162
* @since 3.0.0
163163
*
164164
* @param {string} key - [description]
165-
* @param {any} data - [description]
165+
* @param {*} data - [description]
166166
*
167167
* @return {Phaser.Data.DataManager} This DataManager object.
168168
*/
@@ -293,7 +293,7 @@ var DataManager = new Class({
293293
*
294294
* @param {string} key - [description]
295295
*
296-
* @return {any} [description]
296+
* @return {*} [description]
297297
*/
298298
pop: function (key)
299299
{

src/display/canvas/CanvasPool.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var _disableContextSmoothing = false;
2020
* before a Phaser.Game instance has even been created.
2121
* Which means all instances of Phaser Games on the same page
2222
* can share the one single pool
23-
*
23+
*
2424
* @namespace Phaser.Display.Canvas.CanvasPool
2525
* @since 3.0.0
2626
*/
@@ -31,12 +31,12 @@ var CanvasPool = function ()
3131
*
3232
* @function Phaser.Display.Canvas.CanvasPool.create
3333
* @since 3.0.0
34-
*
35-
* @param {any} parent - The parent of the Canvas object.
34+
*
35+
* @param {*} parent - The parent of the Canvas object.
3636
* @param {integer} [width=1] - The width of the Canvas.
3737
* @param {integer} [height=1] - The height of the Canvas.
3838
* @param {integer} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.
39-
*
39+
*
4040
* @return {HTMLCanvasElement} [description]
4141
*/
4242
var create = function (parent, width, height, canvasType)
@@ -74,7 +74,7 @@ var CanvasPool = function ()
7474
{
7575
Smoothing.disable(canvas.getContext('2d'));
7676
}
77-
77+
7878
return canvas;
7979
};
8080

@@ -83,11 +83,11 @@ var CanvasPool = function ()
8383
*
8484
* @function Phaser.Display.Canvas.CanvasPool.create2D
8585
* @since 3.0.0
86-
*
87-
* @param {any} parent - The parent of the Canvas object.
86+
*
87+
* @param {*} parent - The parent of the Canvas object.
8888
* @param {integer} [width=1] - The width of the Canvas.
8989
* @param {integer} [height=1] - The height of the Canvas.
90-
*
90+
*
9191
* @return {HTMLCanvasElement} [description]
9292
*/
9393
var create2D = function (parent, width, height)
@@ -100,11 +100,11 @@ var CanvasPool = function ()
100100
*
101101
* @function Phaser.Display.Canvas.CanvasPool.createWebGL
102102
* @since 3.0.0
103-
*
104-
* @param {any} parent - The parent of the Canvas object.
103+
*
104+
* @param {*} parent - The parent of the Canvas object.
105105
* @param {integer} [width=1] - The width of the Canvas.
106106
* @param {integer} [height=1] - The height of the Canvas.
107-
*
107+
*
108108
* @return {HTMLCanvasElement} [description]
109109
*/
110110
var createWebGL = function (parent, width, height)
@@ -117,9 +117,9 @@ var CanvasPool = function ()
117117
*
118118
* @function Phaser.Display.Canvas.CanvasPool.first
119119
* @since 3.0.0
120-
*
120+
*
121121
* @param {integer} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.
122-
*
122+
*
123123
* @return {HTMLCanvasElement} [description]
124124
*/
125125
var first = function (canvasType)
@@ -143,8 +143,8 @@ var CanvasPool = function ()
143143
*
144144
* @function Phaser.Display.Canvas.CanvasPool.remove
145145
* @since 3.0.0
146-
*
147-
* @param {any} parent - [description]
146+
*
147+
* @param {*} parent - [description]
148148
*/
149149
var remove = function (parent)
150150
{
@@ -168,7 +168,7 @@ var CanvasPool = function ()
168168
*
169169
* @function Phaser.Display.Canvas.CanvasPool.total
170170
* @since 3.0.0
171-
*
171+
*
172172
* @return {integer} [description]
173173
*/
174174
var total = function ()
@@ -191,7 +191,7 @@ var CanvasPool = function ()
191191
*
192192
* @function Phaser.Display.Canvas.CanvasPool.free
193193
* @since 3.0.0
194-
*
194+
*
195195
* @return {integer} [description]
196196
*/
197197
var free = function ()

src/gameobjects/GameObject.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ var GameObject = new Class({
211211
* @since 3.0.0
212212
*
213213
* @param {string} key - The key of the property to be stored.
214-
* @param {any} value - The value to store with the key. Can be a string, number, array or object.
214+
* @param {*} value - The value to store with the key. Can be a string, number, array or object.
215215
*
216216
* @return {Phaser.GameObjects.GameObject} This GameObject.
217217
*/
@@ -235,7 +235,7 @@ var GameObject = new Class({
235235
*
236236
* @param {string} key - The key of the property to be retrieved.
237237
*
238-
* @return {any} The data, if present in the Data Store.
238+
* @return {*} The data, if present in the Data Store.
239239
*/
240240
getData: function (key)
241241
{
@@ -253,7 +253,7 @@ var GameObject = new Class({
253253
* @method Phaser.GameObjects.GameObject#setInteractive
254254
* @since 3.0.0
255255
*
256-
* @param {any} [shape] - A geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.
256+
* @param {*} [shape] - A geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.
257257
* @param {HitAreaCallback} [callback] - A callback to be invoked when the Game Object is interacted with.
258258
* @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?
259259
*

src/gameobjects/particles/ParticleEmitter.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ var ParticleEmitter = new Class({
423423
* [description]
424424
*
425425
* @name Phaser.GameObjects.Particles.ParticleEmitter#emitCallbackScope
426-
* @type {?any}
426+
* @type {?*}
427427
* @default null
428428
* @since 3.0.0
429429
*/
@@ -443,7 +443,7 @@ var ParticleEmitter = new Class({
443443
* [description]
444444
*
445445
* @name Phaser.GameObjects.Particles.ParticleEmitter#deathCallbackScope
446-
* @type {?any}
446+
* @type {?*}
447447
* @default null
448448
* @since 3.0.0
449449
*/
@@ -1548,7 +1548,7 @@ var ParticleEmitter = new Class({
15481548
* @since 3.0.0
15491549
*
15501550
* @param {ParticleEmitterCallback} callback - [description]
1551-
* @param {any} [context] - [description]
1551+
* @param {*} [context] - [description]
15521552
*
15531553
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
15541554
*/
@@ -1580,7 +1580,7 @@ var ParticleEmitter = new Class({
15801580
* @since 3.0.0
15811581
*
15821582
* @param {ParticleDeathCallback} callback - [description]
1583-
* @param {any} [context] - [description]
1583+
* @param {*} [context] - [description]
15841584
*
15851585
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
15861586
*/
@@ -1633,7 +1633,7 @@ var ParticleEmitter = new Class({
16331633
* @since 3.0.0
16341634
*
16351635
* @param {ParticleEmitterCallback} callback - [description]
1636-
* @param {any} thisArg - [description]
1636+
* @param {*} thisArg - [description]
16371637
*
16381638
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
16391639
*/
@@ -1658,7 +1658,7 @@ var ParticleEmitter = new Class({
16581658
* @since 3.0.0
16591659
*
16601660
* @param {ParticleEmitterCallback} callback - [description]
1661-
* @param {any} thisArg - [description]
1661+
* @param {*} thisArg - [description]
16621662
*
16631663
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
16641664
*/

src/input/InteractiveObject.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
* @callback HitAreaCallback
1111
*
12-
* @param {any} hitArea - [description]
12+
* @param {*} hitArea - [description]
1313
* @param {number} x - [description]
1414
* @param {number} y - [description]
1515
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
@@ -26,7 +26,7 @@
2626
* @property {boolean} dropZone - [description]
2727
* @property {[type]} target - [description]
2828
* @property {Phaser.Cameras.Scene2D.Camera} camera - [description]
29-
* @property {any} hitArea - [description]
29+
* @property {*} hitArea - [description]
3030
* @property {HitAreaCallback} hitAreaCallback - [description]
3131
* @property {number} localX - [description]
3232
* @property {number} localY - [description]
@@ -44,7 +44,7 @@
4444
* @since 3.0.0
4545
*
4646
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
47-
* @param {any} hitArea - [description]
47+
* @param {*} hitArea - [description]
4848
* @param {HitAreaCallback} hitAreaCallback - [description]
4949
*
5050
* @return {InteractiveObject} [description]

src/loader/File.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ var File = new Class({
173173
* The processed file data, stored in here after the file has loaded.
174174
*
175175
* @name Phaser.Loader.File#data
176-
* @type {any}
176+
* @type {*}
177177
* @since 3.0.0
178178
*/
179179
this.data = undefined;

src/loader/LoaderPlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ var LoaderPlugin = new Class({
812812
* @method Phaser.Loader.LoaderPlugin#saveJSON
813813
* @since 3.0.0
814814
*
815-
* @param {any} data - [description]
815+
* @param {*} data - [description]
816816
* @param {string} [filename=file.json] - [description]
817817
*
818818
* @return {Phaser.Loader.LoaderPlugin} This Loader plugin.
@@ -828,7 +828,7 @@ var LoaderPlugin = new Class({
828828
* @method Phaser.Loader.LoaderPlugin#save
829829
* @since 3.0.0
830830
*
831-
* @param {any} data - [description]
831+
* @param {*} data - [description]
832832
* @param {string} [filename=file.json] - [description]
833833
* @param {string} [filetype=application/json] - [description]
834834
*

src/math/random-data-generator/RandomDataGenerator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ var RandomDataGenerator = new Class({
177177
* @method Phaser.Math.RandomDataGenerator#sow
178178
* @since 3.0.0
179179
*
180-
* @param {any[]} seeds - The array of seeds: the `toString()` of each value is used.
180+
* @param {*[]} seeds - The array of seeds: the `toString()` of each value is used.
181181
*/
182182
sow: function (seeds)
183183
{
@@ -339,7 +339,7 @@ var RandomDataGenerator = new Class({
339339
*
340340
* @param {array} array - The array to pick a random element from.
341341
*
342-
* @return {any} A random member of the array.
342+
* @return {*} A random member of the array.
343343
*/
344344
pick: function (array)
345345
{
@@ -367,7 +367,7 @@ var RandomDataGenerator = new Class({
367367
*
368368
* @param {array} array - The array to pick a random element from.
369369
*
370-
* @return {any} A random member of the array.
370+
* @return {*} A random member of the array.
371371
*/
372372
weightedPick: function (array)
373373
{

0 commit comments

Comments
 (0)