Fix types on Animations and Boot

This commit is contained in:
orblazer 2018-03-27 13:30:00 +02:00
parent bdf373b6e8
commit 0d58832e5f
4 changed files with 33 additions and 33 deletions

View file

@ -36,7 +36,7 @@ var GetValue = require('../utils/object/GetValue');
*/
/**
* @typedef {object} AnimationConfig // TODO 19/03/2018 fix type
* @typedef {object} AnimationConfig
*
* @property {AnimationFrameConfig[]} [frames] - [description]
* @property {string} [defaultTextureKey=null] - [description]
@ -49,15 +49,15 @@ var GetValue = require('../utils/object/GetValue');
* @property {boolean} [yoyo=false] - Should the animation yoyo? (reverse back down to the start) before repeating?
* @property {boolean} [showOnStart=false] - Should sprite.visible = true when the animation starts to play?
* @property {boolean} [hideOnComplete=false] - Should sprite.visible = false when the animation finishes?
* @property {object} [callbackScope] - [description]
* @property {boolean} [onStart=false] - [description]
* @property {array} [onStartParams] - [description]
* @property {boolean} [onRepeat=false] - [description]
* @property {array} [onRepeatParams] - [description]
* @property {boolean} [onUpdate=false] - [description]
* @property {array} [onUpdateParams] - [description]
* @property {boolean} [onComplete=false] - [description]
* @property {array} [onCompleteParams] - [description]
* @property {*} [callbackScope] - [description]
* @property {(false|function)} [onStart=false] - [description]
* @property {Array.<*>} [onStartParams] - [description]
* @property {(false|function)} [onRepeat=false] - [description]
* @property {Array.<*>} [onRepeatParams] - [description]
* @property {(false|function)} [onUpdate=false] - [description]
* @property {Array.<*>} [onUpdateParams] - [description]
* @property {(false|function)} [onComplete=false] - [description]
* @property {Array.<*>} [onCompleteParams] - [description]
*/
/**
@ -250,7 +250,7 @@ var Animation = new Class({
* [description]
*
* @name Phaser.Animations.Animation#callbackScope
* @type {object}
* @type {*}
* @since 3.0.0
*/
this.callbackScope = GetValue(config, 'callbackScope', this);
@ -259,7 +259,7 @@ var Animation = new Class({
* [description]
*
* @name Phaser.Animations.Animation#onStart
* @type {function}
* @type {(false|function)}
* @since 3.0.0
*/
this.onStart = GetValue(config, 'onStart', false);
@ -268,7 +268,7 @@ var Animation = new Class({
* [description]
*
* @name Phaser.Animations.Animation#onStartParams
* @type {array}
* @type {Array.<*>}
* @since 3.0.0
*/
this.onStartParams = GetValue(config, 'onStartParams', []);
@ -277,7 +277,7 @@ var Animation = new Class({
* [description]
*
* @name Phaser.Animations.Animation#onRepeat
* @type {function}
* @type {(false|function)}
* @since 3.0.0
*/
this.onRepeat = GetValue(config, 'onRepeat', false);
@ -286,7 +286,7 @@ var Animation = new Class({
* [description]
*
* @name Phaser.Animations.Animation#onRepeatParams
* @type {array}
* @type {Array.<*>}
* @since 3.0.0
*/
this.onRepeatParams = GetValue(config, 'onRepeatParams', []);
@ -296,7 +296,7 @@ var Animation = new Class({
* See AnimationFrame.onUpdate for a frame specific callback.
*
* @name Phaser.Animations.Animation#onUpdate
* @type {function}
* @type {(false|function)}
* @since 3.0.0
*/
this.onUpdate = GetValue(config, 'onUpdate', false);
@ -305,7 +305,7 @@ var Animation = new Class({
* [description]
*
* @name Phaser.Animations.Animation#onUpdateParams
* @type {array}
* @type {Array.<*>}
* @since 3.0.0
*/
this.onUpdateParams = GetValue(config, 'onUpdateParams', []);
@ -314,7 +314,7 @@ var Animation = new Class({
* [description]
*
* @name Phaser.Animations.Animation#onComplete
* @type {function}
* @type {(false|function)}
* @since 3.0.0
*/
this.onComplete = GetValue(config, 'onComplete', false);
@ -323,7 +323,7 @@ var Animation = new Class({
* [description]
*
* @name Phaser.Animations.Animation#onCompleteParams
* @type {array}
* @type {Array.<*>}
* @since 3.0.0
*/
this.onCompleteParams = GetValue(config, 'onCompleteParams', []);

View file

@ -80,7 +80,7 @@ var AnimationManager = new Class({
* [description]
*
* @name Phaser.Animations.AnimationManager#anims
* @type {Phaser.Structs.Map<string, Phaser.Animations.Animation>}
* @type {Phaser.Structs.Map.<string, Phaser.Animations.Animation>}
* @protected
* @since 3.0.0
*/
@ -186,7 +186,7 @@ var AnimationManager = new Class({
* @method Phaser.Animations.AnimationManager#fromJSON
* @since 3.0.0
*
* @param {(string|object)} data - [description]
* @param {(string|JSONAnimationManager|JSONAnimation)} data - [description]
* @param {boolean} [clearCurrentAnimations=false] - [description]
*
* @return {Phaser.Animations.Animation[]} An array containing all of the Animation objects that were created as a result of this call.
@ -242,7 +242,7 @@ var AnimationManager = new Class({
* @param {integer} [config.end=0] - [description]
* @param {string} [config.suffix=''] - [description]
* @param {integer} [config.zeroPad=0] - [description]
* @param {array} [config.outputArray=[]] - [description]
* @param {AnimationFrameConfig[]} [config.outputArray=[]] - [description]
* @param {boolean} [config.frames=false] - [description]
*
* @return {AnimationFrameConfig[]} [description]
@ -312,7 +312,7 @@ var AnimationManager = new Class({
* @param {integer} [config.start=0] - [description]
* @param {integer} [config.end=-1] - [description]
* @param {boolean} [config.first=false] - [description]
* @param {array} [config.outputArray=[]] - [description]
* @param {AnimationFrameConfig[]} [config.outputArray=[]] - [description]
* @param {boolean} [config.frames=false] - [description]
*
* @return {AnimationFrameConfig[]} [description]

View file

@ -57,7 +57,7 @@ var ValueToColor = require('../display/color/ValueToColor');
* @property {number} [zoom=1] - [description]
* @property {number} [resolution=1] - [description]
* @property {number} [type=CONST.AUTO] - [description]
* @property {object} [?parent=null] - [description]
* @property {*} [?parent=null] - [description]
* @property {HTMLCanvasElement} [?canvas=null] - [description]
* @property {string} [?canvasStyle=null] - [description]
* @property {object} [?scene=null] - [description]
@ -65,17 +65,17 @@ var ValueToColor = require('../display/color/ValueToColor');
* @property {string} [title=''] - [description]
* @property {string} [url='http://phaser.io'] - [description]
* @property {string} [version=''] - [description]
* @property {object} [input] - [description]
* @property {(boolean|object)} [input] - [description]
* @property {boolean} [input.keyboard=true] - [description]
* @property {object} [input.keyboard.target=window] - [description]
* @property {boolean} [input.mouse=true] - [description]
* @property {object} [?input.mouse.target=null] - [description]
* @property {*} [input.keyboard.target=window] - [description]
* @property {(boolean|object)} [input.mouse=true] - [description]
* @property {*} [?input.mouse.target=null] - [description]
* @property {boolean} [input.touch=true] - [description]
* @property {object} [?input.touch.target=null] - [description]
* @property {object} [?input.touch.capture=true] - [description]
* @property {boolean} [input.gamepad=false] - [description]
* @property {*} [?input.touch.target=null] - [description]
* @property {boolean} [?input.touch.capture=true] - [description]
* @property {(boolean|object)} [input.gamepad=false] - [description]
* @property {boolean} [disableContextMenu=false] - [description]
* @property {boolean} [banner=false] - [description]
* @property {(boolean|object)} [banner=false] - [description]
* @property {boolean} [banner.hidePhaser=false] - [description]
* @property {string} [banner.text='#ffffff'] - [description]
* @property {string[]} [banner.background] - [description]

View file

@ -44,7 +44,7 @@ var VisibilityHandler = require('./VisibilityHandler');
* @constructor
* @since 3.0.0
*
* @param {object} [GameConfig] - The configuration object for your Phaser Game instance.
* @param {GameConfig} [GameConfig] - The configuration object for your Phaser Game instance.
*/
var Game = new Class({