Remove misplaced function annotations for defineSecureProp
Seemed like a good idea at the time, but now Closure Compiler complains.master
parent
54412f24b6
commit
3bd52122c5
|
@ -1491,6 +1491,9 @@ exports.getMethodInstance = function( inst, cid )
|
|||
/**
|
||||
* Attaches isAbstract() method to the class
|
||||
*
|
||||
* The method returns whether the class contains abstract methods (and is
|
||||
* therefore abstract).
|
||||
*
|
||||
* @param {Function} func function (class) to attach method to
|
||||
* @param {Array} methods abstract method names
|
||||
*
|
||||
|
@ -1500,12 +1503,6 @@ function attachAbstract( func, methods )
|
|||
{
|
||||
var is_abstract = ( methods.__length > 0 ) ? true: false;
|
||||
|
||||
/**
|
||||
* Returns whether the class contains abstract methods (and is therefore
|
||||
* abstract)
|
||||
*
|
||||
* @return {boolean} true if class is abstract, otherwise false
|
||||
*/
|
||||
util.defineSecureProp( func, 'isAbstract', function()
|
||||
{
|
||||
return is_abstract;
|
||||
|
|
13
lib/class.js
13
lib/class.js
|
@ -745,22 +745,15 @@ function setupProps( func )
|
|||
/**
|
||||
* Attaches extend method to the given function (class)
|
||||
*
|
||||
* This is a shorthand method that can be invoked on the object, rather than
|
||||
* having to call Class.extend( this ).
|
||||
*
|
||||
* @param {Function} func function (class) to attach method to
|
||||
*
|
||||
* @return {undefined}
|
||||
*/
|
||||
function attachExtend( func )
|
||||
{
|
||||
/**
|
||||
* Shorthand for extending classes
|
||||
*
|
||||
* This method can be invoked on the object, rather than having to call
|
||||
* Class.extend( this ).
|
||||
*
|
||||
* @param {Object} props properties to add to extended class
|
||||
*
|
||||
* @return {Object} extended class
|
||||
*/
|
||||
util.defineSecureProp( func, 'extend', function( props )
|
||||
{
|
||||
return extend( this, props );
|
||||
|
|
|
@ -338,22 +338,15 @@ function inheritCheck( prototype )
|
|||
/**
|
||||
* Attaches extend method to the given function (interface)
|
||||
*
|
||||
* This shorthand method can be invoked on the object, rather than having to
|
||||
* call Interface.extend( this ).
|
||||
*
|
||||
* @param {Function} func function (interface) to attach method to
|
||||
*
|
||||
* @return {undefined}
|
||||
*/
|
||||
function attachExtend( func )
|
||||
{
|
||||
/**
|
||||
* Shorthand for extending interfaces
|
||||
*
|
||||
* This method can be invoked on the object, rather than having to call
|
||||
* Interface.extend( this ).
|
||||
*
|
||||
* @param {Object} props properties to add to extended interface
|
||||
*
|
||||
* @return {Object} extended interface
|
||||
*/
|
||||
util.defineSecureProp( func, 'extend', function( props )
|
||||
{
|
||||
return extend( this, props );
|
||||
|
|
Loading…
Reference in New Issue