mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 23:20:59 +00:00
Merge pull request #4380 from englercj/master
Correct jsdoc for Class utilities
This commit is contained in:
commit
dfb1e48f6f
1 changed files with 17 additions and 1 deletions
|
@ -66,6 +66,15 @@ function hasNonConfigurable (obj, k)
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extends the given `myClass` object's prototype with the properties of `definition`.
|
||||
*
|
||||
* @function Phaser.Class.extend
|
||||
* @param {Object} ctor The constructor object to mix into.
|
||||
* @param {Object} definition A dictionary of functions for the class.
|
||||
* @param {boolean} isClassDescriptor Is the definition a class descriptor?
|
||||
* @param {Object} [extend] The parent constructor object.
|
||||
*/
|
||||
function extend (ctor, definition, isClassDescriptor, extend)
|
||||
{
|
||||
for (var k in definition)
|
||||
|
@ -108,6 +117,13 @@ function extend (ctor, definition, isClassDescriptor, extend)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the given `mixins` to the prototype of `myClass`.
|
||||
*
|
||||
* @function Phaser.Class.mixin
|
||||
* @param {Object} myClass The constructor object to mix into.
|
||||
* @param {Object|Array<Object>} mixins The mixins to apply to the constructor.
|
||||
*/
|
||||
function mixin (myClass, mixins)
|
||||
{
|
||||
if (!mixins)
|
||||
|
@ -136,7 +152,7 @@ function mixin (myClass, mixins)
|
|||
* You can also use `Extends` and `Mixins` to provide subclassing
|
||||
* and inheritance.
|
||||
*
|
||||
* @class Class
|
||||
* @class Phaser.Class
|
||||
* @constructor
|
||||
* @param {Object} definition a dictionary of functions for the class
|
||||
* @example
|
||||
|
|
Loading…
Reference in a new issue