Skip to content

Commit 90cf919

Browse files
committed
Fix "object" types on Sound and Time
1 parent dcd8037 commit 90cf919

5 files changed

Lines changed: 23 additions & 9 deletions

File tree

src/sound/BaseSound.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ var BaseSound = new Class({
203203
this.config = Extend(this.config, config);
204204

205205
/**
206-
* Object containing markers definitions (Object.<string, SoundMarker>).
206+
* Object containing markers definitions.
207207
*
208208
* @name Phaser.Sound.BaseSound#markers
209-
* @type {object}
209+
* @type {Object.<string, SoundMarker>}
210210
* @default {}
211211
* @readOnly
212212
* @since 3.0.0

src/sound/BaseSoundManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ var BaseSoundManager = new Class({
477477
* @since 3.0.0
478478
*
479479
* @param {EachActiveSoundCallback} callback - Callback function. (sound: ISound, index: number, array: ISound[]) => void
480-
* @param {object} [scope] - Callback context.
480+
* @param {*} [scope] - Callback context.
481481
*/
482482
forEachActiveSound: function (callback, scope)
483483
{

src/time/Clock.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ var Clock = new Class({
136136
* @method Phaser.Time.Clock#addEvent
137137
* @since 3.0.0
138138
*
139-
* @param {object} config - [description]
139+
* @param {TimerEventConfig} config - [description]
140140
*
141141
* @return {Phaser.Time.TimerEvent} [description]
142142
*/
@@ -157,8 +157,8 @@ var Clock = new Class({
157157
*
158158
* @param {number} delay - [description]
159159
* @param {function} callback - [description]
160-
* @param {array} args - [description]
161-
* @param {object} callbackScope - [description]
160+
* @param {*[]} args - [description]
161+
* @param {*} callbackScope - [description]
162162
*
163163
* @return {Phaser.Time.TimerEvent} [description]
164164
*/

src/time/TimerEvent.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@
77
var Class = require('../utils/Class');
88
var GetFastValue = require('../utils/object/GetFastValue');
99

10+
/**
11+
* @typedef {object} TimerEventConfig
12+
*
13+
* @property {number} [delay=0] - [description]
14+
* @property {number} [repeat=0] - [description]
15+
* @property {boolean} [loop=false] - [description]
16+
* @property {function} [callback] - [description]
17+
* @property {*} [callbackScope] - [description]
18+
* @property {*[]} [args] - [description]
19+
* @property {number} [timeScale=1] - [description]
20+
* @property {number} [startAt=1] - [description]
21+
* @property {boolean} [paused=false] - [description]
22+
*/
23+
1024
/**
1125
* @classdesc
1226
* [description]
@@ -16,7 +30,7 @@ var GetFastValue = require('../utils/object/GetFastValue');
1630
* @constructor
1731
* @since 3.0.0
1832
*
19-
* @param {object} config - [description]
33+
* @param {TimerEventConfig} config - [description]
2034
*/
2135
var TimerEvent = new Class({
2236

@@ -153,7 +167,7 @@ var TimerEvent = new Class({
153167
* @method Phaser.Time.TimerEvent#reset
154168
* @since 3.0.0
155169
*
156-
* @param {object} config - [description]
170+
* @param {TimerEventConfig} config - [description]
157171
*
158172
* @return {Phaser.Time.TimerEvent} This TimerEvent object.
159173
*/

src/utils/object/GetFastValue.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @param {object} source - [description]
1818
* @param {string} key - [description]
19-
* @param {*} defaultValue - [description]
19+
* @param {*} [defaultValue] - [description]
2020
*
2121
* @return {*} [description]
2222
*/

0 commit comments

Comments
 (0)