1
0
Fork 0

Remove misplaced function annotations for defineSecureProp

Seemed like a good idea at the time, but now Closure Compiler complains.
master
Mike Gerwitz 2015-10-26 22:46:08 -04:00
parent 54412f24b6
commit 3bd52122c5
No known key found for this signature in database
GPG Key ID: F22BB8158EE30EAB
3 changed files with 9 additions and 26 deletions

View File

@ -1491,6 +1491,9 @@ exports.getMethodInstance = function( inst, cid )
/** /**
* Attaches isAbstract() method to the class * 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 {Function} func function (class) to attach method to
* @param {Array} methods abstract method names * @param {Array} methods abstract method names
* *
@ -1500,12 +1503,6 @@ function attachAbstract( func, methods )
{ {
var is_abstract = ( methods.__length > 0 ) ? true: false; 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() util.defineSecureProp( func, 'isAbstract', function()
{ {
return is_abstract; return is_abstract;

View File

@ -745,22 +745,15 @@ function setupProps( func )
/** /**
* Attaches extend method to the given function (class) * 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 * @param {Function} func function (class) to attach method to
* *
* @return {undefined} * @return {undefined}
*/ */
function attachExtend( func ) 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 ) util.defineSecureProp( func, 'extend', function( props )
{ {
return extend( this, props ); return extend( this, props );

View File

@ -338,22 +338,15 @@ function inheritCheck( prototype )
/** /**
* Attaches extend method to the given function (interface) * 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 * @param {Function} func function (interface) to attach method to
* *
* @return {undefined} * @return {undefined}
*/ */
function attachExtend( func ) 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 ) util.defineSecureProp( func, 'extend', function( props )
{ {
return extend( this, props ); return extend( this, props );