mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 05:58:30 +00:00
Correct jsdoc for Class utilities
This commit is contained in:
parent
376f06d2a9
commit
5fbef0b1cb
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…
Add table
Reference in a new issue