Skip to content

Commit 37b6fc5

Browse files
committed
Fix many multiple types
1 parent 3cb00c8 commit 37b6fc5

20 files changed

Lines changed: 84 additions & 84 deletions

src/animations/Animation.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var GetValue = require('../utils/object/GetValue');
2929
* @typedef {object} AnimationFrameConfig
3030
*
3131
* @property {string} key - [description]
32-
* @property {string|number} frame - [description]
32+
* @property {(string|number)} frame - [description]
3333
* @property {float} [duration=0] - [description]
3434
* @property {boolean} [visible] - [description]
3535
* @property {function} [onUpdate] - [description]
@@ -350,7 +350,7 @@ var Animation = new Class({
350350
* @method Phaser.Animations.Animation#addFrame
351351
* @since 3.0.0
352352
*
353-
* @param {string|AnimationFrameConfig[]} config - [description]
353+
* @param {(string|AnimationFrameConfig[])} config - [description]
354354
*
355355
* @return {Phaser.Animations.Animation} This Animation object.
356356
*/
@@ -368,7 +368,7 @@ var Animation = new Class({
368368
* @since 3.0.0
369369
*
370370
* @param {integer} index - [description]
371-
* @param {string|AnimationFrameConfig[]} config - [description]
371+
* @param {(string|AnimationFrameConfig[])} config - [description]
372372
*
373373
* @return {Phaser.Animations.Animation} This Animation object.
374374
*/
@@ -478,7 +478,7 @@ var Animation = new Class({
478478
* @since 3.0.0
479479
*
480480
* @param {Phaser.Textures.TextureManager} textureManager - [description]
481-
* @param {string|AnimationFrameConfig[]} frames - [description]
481+
* @param {(string|AnimationFrameConfig[])} frames - [description]
482482
* @param {string} [defaultTextureKey] - [description]
483483
*
484484
* @return {Phaser.Animations.AnimationFrame[]} [description]

src/animations/AnimationFrame.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var Class = require('../utils/Class');
1010
* @typedef {object} JSONAnimationFrame
1111
*
1212
* @property {string} key - The key of the Texture this AnimationFrame uses.
13-
* @property {string|integer} frame - The key of the Frame within the Texture that this AnimationFrame uses.
13+
* @property {(string|integer)} frame - The key of the Frame within the Texture that this AnimationFrame uses.
1414
* @property {number} duration - Additional time (in ms) that this frame should appear for during playback.
1515
*/
1616

@@ -30,7 +30,7 @@ var Class = require('../utils/Class');
3030
* @since 3.0.0
3131
*
3232
* @param {string} textureKey - The key of the Texture this AnimationFrame uses.
33-
* @param {string|integer} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses.
33+
* @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses.
3434
* @param {integer} index - The index of this AnimationFrame within the Animation sequence.
3535
* @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering.
3636
*/
@@ -53,7 +53,7 @@ var AnimationFrame = new Class({
5353
* The key of the Frame within the Texture that this AnimationFrame uses.
5454
*
5555
* @name Phaser.Animations.AnimationFrame#textureFrame
56-
* @type {string|integer}
56+
* @type {(string|integer)}
5757
* @since 3.0.0
5858
*/
5959
this.textureFrame = textureFrame;

src/animations/AnimationManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ var AnimationManager = new Class({
186186
* @method Phaser.Animations.AnimationManager#fromJSON
187187
* @since 3.0.0
188188
*
189-
* @param {string|object} data - [description]
189+
* @param {(string|object)} data - [description]
190190
* @param {boolean} [clearCurrentAnimations=false] - [description]
191191
*
192192
* @return {Phaser.Animations.Animation[]} An array containing all of the Animation objects that were created as a result of this call.
@@ -394,7 +394,7 @@ var AnimationManager = new Class({
394394
*
395395
* @param {Phaser.GameObjects.GameObject} child - [description]
396396
* @param {string} key - [description]
397-
* @param {string|integer} [startFrame] - [description]
397+
* @param {(string|integer)} [startFrame] - [description]
398398
*
399399
* @return {Phaser.GameObjects.GameObject} [description]
400400
*/

src/boot/Config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var ValueToColor = require('../display/color/ValueToColor');
4141
* @property {string} [path] - [description]
4242
* @property {boolean} [enableParallel=true] - [description]
4343
* @property {integer} [maxParallelDownloads=4] - [description]
44-
* @property {string|undefined} [crossOrigin=undefined] - [description]
44+
* @property {(string|undefined)} [crossOrigin=undefined] - [description]
4545
* @property {string} [responseType] - [description]
4646
* @property {boolean} [async=true] - [description]
4747
* @property {string} [user] - [description]
@@ -52,8 +52,8 @@ var ValueToColor = require('../display/color/ValueToColor');
5252
/**
5353
* @typedef {object} GameConfig
5454
*
55-
* @property {integer|string} [width=1024] - [description]
56-
* @property {integer|string} [height=768] - [description]
55+
* @property {(integer|string)} [width=1024] - [description]
56+
* @property {(integer|string)} [height=768] - [description]
5757
* @property {number} [zoom=1] - [description]
5858
* @property {number} [resolution=1] - [description]
5959
* @property {number} [type=CONST.AUTO] - [description]
@@ -90,7 +90,7 @@ var ValueToColor = require('../display/color/ValueToColor');
9090
* @property {boolean} [preserveDrawingBuffer=false] - [description]
9191
* @property {boolean} [failIfMajorPerformanceCaveat=false] - [description]
9292
* @property {boolean} [powerPreference='default'] - "high-performance", "low-power" or "default"
93-
* @property {string|number} [backgroundColor=0x000000] - [description]
93+
* @property {(string|number)} [backgroundColor=0x000000] - [description]
9494
* @property {object} [?callbacks] - [description]
9595
* @property {BootCallback} [callbacks.preBoot=NOOP] - [description]
9696
* @property {BootCallback} [callbacks.postBoot=NOOP] - [description]

src/boot/Game.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ var Game = new Class({
6868
* A reference to either the Canvas or WebGL Renderer that this Game is using.
6969
*
7070
* @name Phaser.Game#renderer
71-
* @type {Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer}
71+
* @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}
7272
* @since 3.0.0
7373
*/
7474
this.renderer = null;
@@ -323,7 +323,7 @@ var Game = new Class({
323323
* the Scenes for rendering, but it won't have actually drawn anything yet.
324324
*
325325
* @event Phaser.Game#prerenderEvent
326-
* @param {Phaser.Renderer.CanvasRenderer|Phaser.Renderer.WebGLRenderer} renderer - A reference to the current renderer.
326+
* @param {(Phaser.Renderer.CanvasRenderer|Phaser.Renderer.WebGLRenderer)} renderer - A reference to the current renderer.
327327
*/
328328

329329
/**
@@ -333,7 +333,7 @@ var Game = new Class({
333333
* Every Scene will have rendered and drawn to the canvas.
334334
*
335335
* @event Phaser.Game#postrenderEvent
336-
* @param {Phaser.Renderer.CanvasRenderer|Phaser.Renderer.WebGLRenderer} renderer - A reference to the current renderer.
336+
* @param {(Phaser.Renderer.CanvasRenderer|Phaser.Renderer.WebGLRenderer)} renderer - A reference to the current renderer.
337337
*/
338338

339339
/**

src/cameras/2d/Camera.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ var Camera = new Class({
874874
*
875875
* @param {number} x - [description]
876876
* @param {number} y - [description]
877-
* @param {object|Phaser.Math.Vector2} output - [description]
877+
* @param {(object|Phaser.Math.Vector2)} output - [description]
878878
*
879879
* @return {Phaser.Math.Vector2} [description]
880880
*/
@@ -935,7 +935,7 @@ var Camera = new Class({
935935
* @method Phaser.Cameras.Scene2D.Camera#ignore
936936
* @since 3.0.0
937937
*
938-
* @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} gameObjectOrArray - [description]
938+
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjectOrArray - [description]
939939
*
940940
* @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.
941941
*/
@@ -1068,7 +1068,7 @@ var Camera = new Class({
10681068
* @method Phaser.Cameras.Scene2D.Camera#setBackgroundColor
10691069
* @since 3.0.0
10701070
*
1071-
* @param {string|number|InputColorObject} color - [description]
1071+
* @param {(string|number|InputColorObject)} color - [description]
10721072
*
10731073
* @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.
10741074
*/
@@ -1288,7 +1288,7 @@ var Camera = new Class({
12881288
* @method Phaser.Cameras.Scene2D.Camera#startFollow
12891289
* @since 3.0.0
12901290
*
1291-
* @param {Phaser.GameObjects.GameObject|object} target - [description]
1291+
* @param {(Phaser.GameObjects.GameObject|object)} target - [description]
12921292
* @param {boolean} roundPx - [description]
12931293
*
12941294
* @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.

src/cameras/2d/CameraManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ var CameraManager = new Class({
236236
* @method Phaser.Cameras.Scene2D.CameraManager#fromJSON
237237
* @since 3.0.0
238238
*
239-
* @param {object|object[]} config - [description]
239+
* @param {(object|object[])} config - [description]
240240
*
241241
* @return {Phaser.Cameras.Scene2D.CameraManager} [description]
242242
*/
@@ -375,7 +375,7 @@ var CameraManager = new Class({
375375
* @method Phaser.Cameras.Scene2D.CameraManager#render
376376
* @since 3.0.0
377377
*
378-
* @param {Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer} renderer - The Renderer that will render the children to this camera.
378+
* @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Renderer that will render the children to this camera.
379379
* @param {Phaser.GameObjects.GameObject[]} children - An array of renderable Game Objects.
380380
* @param {number} interpolation - Interpolation value. Reserved for future use.
381381
*/

src/cameras/controls/FixedKeyControl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var GetValue = require('../../utils/object/GetValue');
2424
* @property {Phaser.Input.Keyboard.Key} [zoomIn] - The Key to be pressed that will zoom the Camera in.
2525
* @property {Phaser.Input.Keyboard.Key} [zoomOut] - The Key to be pressed that will zoom the Camera out.
2626
* @property {float} [zoomSpeed=0.01] - The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed.
27-
* @property {float|{x:float,y:float}} [speed=0] - The horizontal and vertical speed the camera will move.
27+
* @property {(float|{x:float,y:float})} [speed=0] - The horizontal and vertical speed the camera will move.
2828
*/
2929

3030
/**

src/cameras/controls/SmoothedKeyControl.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ var GetValue = require('../../utils/object/GetValue');
3131
* @property {Phaser.Input.Keyboard.Key} [zoomIn] - The Key to be pressed that will zoom the Camera in.
3232
* @property {Phaser.Input.Keyboard.Key} [zoomOut] - The Key to be pressed that will zoom the Camera out.
3333
* @property {float} [zoomSpeed=0.01] - The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed.
34-
* @property {float|{x:float,y:float}} [acceleration=0] - The horizontal and vertical acceleration the camera will move.
35-
* @property {float|{x:float,y:float}} [drag=0] - The horizontal and vertical drag applied to the camera when it is moving.
36-
* @property {float|{x:float,y:float}} [maxSpeed=0] - The maximum horizontal and vertical speed the camera will move.
34+
* @property {(float|{x:float,y:float})} [acceleration=0] - The horizontal and vertical acceleration the camera will move.
35+
* @property {(float|{x:float,y:float})} [drag=0] - The horizontal and vertical drag applied to the camera when it is moving.
36+
* @property {(float|{x:float,y:float})} [maxSpeed=0] - The maximum horizontal and vertical speed the camera will move.
3737
*/
3838

3939
/**

src/cameras/sprite3d/Camera.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ var Camera = new Class({
368368
* @param {number} y - [description]
369369
* @param {number} z - [description]
370370
* @param {string} key - [description]
371-
* @param {string|number} frame - [description]
371+
* @param {(string|number)} frame - [description]
372372
* @param {boolean} [visible=true] - [description]
373373
*
374374
* @return {Phaser.GameObjects.Sprite3D} [description]
@@ -399,7 +399,7 @@ var Camera = new Class({
399399
*
400400
* @param {number} quantity - [description]
401401
* @param {string} key - [description]
402-
* @param {string|number} frame - [description]
402+
* @param {(string|number)} frame - [description]
403403
* @param {boolean} [visible=true] - [description]
404404
*
405405
* @return {Phaser.GameObjects.Sprite3D[]} [description]
@@ -435,10 +435,10 @@ var Camera = new Class({
435435
* @method Phaser.Cameras.Sprite3D.Camera#createRect
436436
* @since 3.0.0
437437
*
438-
* @param {number|{x:number,y:number}} size - [description]
439-
* @param {number|{x:number,y:number,z:number}} spacing - [description]
438+
* @param {(number|{x:number,y:number})} size - [description]
439+
* @param {(number|{x:number,y:number,z:number})} spacing - [description]
440440
* @param {string} key - [description]
441-
* @param {string|number} [frame] - [description]
441+
* @param {(string|number)} [frame] - [description]
442442
*
443443
* @return {Phaser.GameObjects.Sprite3D[]} [description]
444444
*/
@@ -595,7 +595,7 @@ var Camera = new Class({
595595
* @method Phaser.Cameras.Sprite3D.Camera#translate
596596
* @since 3.0.0
597597
*
598-
* @param {number|object} x - [description]
598+
* @param {(number|object)} x - [description]
599599
* @param {number} [y] - [description]
600600
* @param {number} [z] - [description]
601601
*
@@ -625,7 +625,7 @@ var Camera = new Class({
625625
* @method Phaser.Cameras.Sprite3D.Camera#lookAt
626626
* @since 3.0.0
627627
*
628-
* @param {number|object} x - [description]
628+
* @param {(number|object)} x - [description]
629629
* @param {number} [y] - [description]
630630
* @param {number} [z] - [description]
631631
*

0 commit comments

Comments
 (0)