From 3bd52122c54d3cbafbe2f7cc40b410a5dc081f9f Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Mon, 26 Oct 2015 22:46:08 -0400 Subject: [PATCH] Remove misplaced function annotations for defineSecureProp Seemed like a good idea at the time, but now Closure Compiler complains. --- lib/ClassBuilder.js | 9 +++------ lib/class.js | 13 +++---------- lib/interface.js | 13 +++---------- 3 files changed, 9 insertions(+), 26 deletions(-) diff --git a/lib/ClassBuilder.js b/lib/ClassBuilder.js index d8b9d27..21bcc1e 100644 --- a/lib/ClassBuilder.js +++ b/lib/ClassBuilder.js @@ -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; diff --git a/lib/class.js b/lib/class.js index 1fc788c..65351e9 100644 --- a/lib/class.js +++ b/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 ); diff --git a/lib/interface.js b/lib/interface.js index d93bf80..522fac8 100644 --- a/lib/interface.js +++ b/lib/interface.js @@ -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 );