Skip to content

Commit d8dc7fb

Browse files
committed
TS def improvements
1 parent 88b088b commit d8dc7fb

7 files changed

Lines changed: 13 additions & 15 deletions

File tree

src/data/DataManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var Events = require('./events');
2828
* @since 3.0.0
2929
*
3030
* @param {object} parent - The object that this DataManager belongs to.
31-
* @param {Phaser.Events.EventEmitter} eventEmitter - The DataManager's event emitter.
31+
* @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.
3232
*/
3333
var DataManager = new Class({
3434

src/math/easing/linear/Linear.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* Linear easing (no variation).
99
*
10-
* @function Phaser.Math.Easing.Linear.Linear
10+
* @function Phaser.Math.Easing.Linear
1111
* @since 3.0.0
1212
*
1313
* @param {number} v - The value to be tweened.

src/math/easing/linear/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,4 @@
44
* @license {@link https://opensource.org/licenses/MIT|MIT License}
55
*/
66

7-
/**
8-
* @namespace Phaser.Math.Easing.Linear
9-
*/
10-
117
module.exports = require('./Linear');

src/tweens/typedefs/NumberTweenBuilderConfig.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
* @property {number} [repeat=0] - The number of times to repeat the tween.
1313
* @property {number} [repeatDelay=0] - The number of milliseconds to pause before a tween will repeat.
1414
* @property {boolean} [yoyo=false] - Should the tween complete, then reverse the values incrementally to get back to the starting tween values? The reverse tweening will also take `duration` milliseconds to complete.
15-
* @property {number|function|object|array} [offset=null] - Used when the Tween is part of a Timeline.
16-
* @property {number|function|object|array} [completeDelay=0] - The time the tween will wait before the onComplete event is dispatched once it has completed, in ms.
17-
* @property {number|function|object|array} [loop=0] - The number of times the tween will repeat. (A value of 1 means the tween will play twice, as it repeated once.) The first loop starts after every property tween has completed once.
18-
* @property {number|function|object|array} [loopDelay=0] - The time the tween will pause before starting either a yoyo or returning to the start for a repeat.
15+
* @property {string|number|function|object|array} [offset=null] - Used when the Tween is part of a Timeline.
16+
* @property {string|number|function|object|array} [completeDelay=0] - The time the tween will wait before the onComplete event is dispatched once it has completed, in ms.
17+
* @property {string|number|function|object|array} [loop=0] - The number of times the tween will repeat. (A value of 1 means the tween will play twice, as it repeated once.) The first loop starts after every property tween has completed once.
18+
* @property {string|number|function|object|array} [loopDelay=0] - The time the tween will pause before starting either a yoyo or returning to the start for a repeat.
1919
* @property {boolean} [paused=false] - Does the tween start in a paused state (true) or playing (false)?
2020
* @property {boolean} [useFrames=false] - Use frames or milliseconds?
2121
* @property {any} [callbackScope] - Scope (this) for the callbacks. The default scope is the tween.

src/tweens/typedefs/TweenBuilderConfig.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
* @property {boolean} [yoyo=false] - Should the tween complete, then reverse the values incrementally to get back to the starting tween values? The reverse tweening will also take `duration` milliseconds to complete.
1414
* @property {boolean} [flipX=false] - Horizontally flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the `flipX` property.
1515
* @property {boolean} [flipY=false] - Vertically flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the `flipY` property.
16-
* @property {number|function|object|array} [offset=null] - Used when the Tween is part of a Timeline.
17-
* @property {number|function|object|array} [completeDelay=0] - The time the tween will wait before the onComplete event is dispatched once it has completed, in ms.
18-
* @property {number|function|object|array} [loop=0] - The number of times the tween will repeat. (A value of 1 means the tween will play twice, as it repeated once.) The first loop starts after every property tween has completed once.
19-
* @property {number|function|object|array} [loopDelay=0] - The time the tween will pause before starting either a yoyo or returning to the start for a repeat.
16+
* @property {string|number|function|object|array} [offset=null] - Used when the Tween is part of a Timeline.
17+
* @property {string|number|function|object|array} [completeDelay=0] - The time the tween will wait before the onComplete event is dispatched once it has completed, in ms.
18+
* @property {string|number|function|object|array} [loop=0] - The number of times the tween will repeat. (A value of 1 means the tween will play twice, as it repeated once.) The first loop starts after every property tween has completed once.
19+
* @property {string|number|function|object|array} [loopDelay=0] - The time the tween will pause before starting either a yoyo or returning to the start for a repeat.
2020
* @property {boolean} [paused=false] - Does the tween start in a paused state (true) or playing (false)?
2121
* @property {Object.<string,(number|string|Phaser.Types.Tweens.GetEndCallback|Phaser.Types.Tweens.TweenPropConfig)>} [props] - The properties to tween.
2222
* @property {boolean} [useFrames=false] - Use frames or milliseconds?

src/utils/object/Extend.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ var IsPlainObject = require('./IsPlainObject');
1616
* @function Phaser.Utils.Objects.Extend
1717
* @since 3.0.0
1818
*
19+
* @param {...*} [args] - The objects that will be mixed.
20+
*
1921
* @return {object} The extended object.
2022
*/
2123
var Extend = function ()

src/utils/string/Pad.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* @function Phaser.Utils.String.Pad
2828
* @since 3.0.0
2929
*
30-
* @param {string} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.
30+
* @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.
3131
* @param {integer} [len=0] - The number of characters to be added.
3232
* @param {string} [pad=" "] - The string to pad it out with (defaults to a space).
3333
* @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).

0 commit comments

Comments
 (0)