Skip to content

Commit 5fbef0b

Browse files
committed
Correct jsdoc for Class utilities
1 parent 376f06d commit 5fbef0b

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

src/utils/Class.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ function hasNonConfigurable (obj, k)
6666
return false;
6767
}
6868

69+
/**
70+
* Extends the given `myClass` object's prototype with the properties of `definition`.
71+
*
72+
* @function Phaser.Class.extend
73+
* @param {Object} ctor The constructor object to mix into.
74+
* @param {Object} definition A dictionary of functions for the class.
75+
* @param {boolean} isClassDescriptor Is the definition a class descriptor?
76+
* @param {Object} [extend] The parent constructor object.
77+
*/
6978
function extend (ctor, definition, isClassDescriptor, extend)
7079
{
7180
for (var k in definition)
@@ -108,6 +117,13 @@ function extend (ctor, definition, isClassDescriptor, extend)
108117
}
109118
}
110119

120+
/**
121+
* Applies the given `mixins` to the prototype of `myClass`.
122+
*
123+
* @function Phaser.Class.mixin
124+
* @param {Object} myClass The constructor object to mix into.
125+
* @param {Object|Array<Object>} mixins The mixins to apply to the constructor.
126+
*/
111127
function mixin (myClass, mixins)
112128
{
113129
if (!mixins)
@@ -136,7 +152,7 @@ function mixin (myClass, mixins)
136152
* You can also use `Extends` and `Mixins` to provide subclassing
137153
* and inheritance.
138154
*
139-
* @class Class
155+
* @class Phaser.Class
140156
* @constructor
141157
* @param {Object} definition a dictionary of functions for the class
142158
* @example

0 commit comments

Comments
 (0)