From 332e935048d161764046b43fe6599e1db2afc3b6 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Wed, 26 Feb 2014 11:46:02 +0000 Subject: docs(*): fix jsdoc type expressions These errors in the docs were preventing some parts of the docs from being parsed. --- src/ng/animate.js | 14 ++--- src/ng/browser.js | 2 +- src/ng/compile.js | 16 ++--- src/ng/filter.js | 2 +- src/ng/http.js | 2 +- src/ng/interval.js | 174 ++++++++++++++++++++++++++-------------------------- src/ng/q.js | 2 +- src/ng/rootScope.js | 2 +- 8 files changed, 107 insertions(+), 107 deletions(-) (limited to 'src/ng') diff --git a/src/ng/animate.js b/src/ng/animate.js index d90f086b..785d1dfa 100644 --- a/src/ng/animate.js +++ b/src/ng/animate.js @@ -49,7 +49,7 @@ var $AnimateProvider = ['$provide', function($provide) { * ``` * * @param {string} name The name of the animation. - * @param {function} factory The factory function that will be executed to return the animation + * @param {Function} factory The factory function that will be executed to return the animation * object. */ this.register = function(name, factory) { @@ -118,7 +118,7 @@ var $AnimateProvider = ['$provide', function($provide) { * a child (if the after element is not present) * @param {DOMElement} after the sibling element which will append the element * after itself - * @param {function=} done callback function that will be called after the element has been + * @param {Function=} done callback function that will be called after the element has been * inserted into the DOM */ enter : function(element, parent, after, done) { @@ -141,7 +141,7 @@ var $AnimateProvider = ['$provide', function($provide) { * @description Removes the element from the DOM. Once complete, the done() callback will be * fired (if provided). * @param {DOMElement} element the element which will be removed from the DOM - * @param {function=} done callback function that will be called after the element has been + * @param {Function=} done callback function that will be called after the element has been * removed from the DOM */ leave : function(element, done) { @@ -164,7 +164,7 @@ var $AnimateProvider = ['$provide', function($provide) { * inserted into (if the after element is not present) * @param {DOMElement} after the sibling element where the element will be * positioned next to - * @param {function=} done the callback function (if provided) that will be fired after the + * @param {Function=} done the callback function (if provided) that will be fired after the * element has been moved to its new position */ move : function(element, parent, after, done) { @@ -183,7 +183,7 @@ var $AnimateProvider = ['$provide', function($provide) { * @param {DOMElement} element the element which will have the className value * added to it * @param {string} className the CSS class which will be added to the element - * @param {function=} done the callback function (if provided) that will be fired after the + * @param {Function=} done the callback function (if provided) that will be fired after the * className value has been added to the element */ addClass : function(element, className, done) { @@ -206,7 +206,7 @@ var $AnimateProvider = ['$provide', function($provide) { * @param {DOMElement} element the element which will have the className value * removed from it * @param {string} className the CSS class which will be removed from the element - * @param {function=} done the callback function (if provided) that will be fired after the + * @param {Function=} done the callback function (if provided) that will be fired after the * className value has been removed from the element */ removeClass : function(element, className, done) { @@ -230,7 +230,7 @@ var $AnimateProvider = ['$provide', function($provide) { * removed from it * @param {string} add the CSS classes which will be added to the element * @param {string} remove the CSS class which will be removed from the element - * @param {function=} done the callback function (if provided) that will be fired after the + * @param {Function=} done the callback function (if provided) that will be fired after the * CSS classes have been set on the element */ setClass : function(element, add, remove, done) { diff --git a/src/ng/browser.js b/src/ng/browser.js index 52a0b979..6bec5280 100644 --- a/src/ng/browser.js +++ b/src/ng/browser.js @@ -245,7 +245,7 @@ function Browser(window, document, $log, $sniffer) { * Returns current * (always relative - without domain) * - * @returns {string=} current + * @returns {string} The current base href */ self.baseHref = function() { var href = baseElement.attr('href'); diff --git a/src/ng/compile.js b/src/ng/compile.js index 0265beb4..13e79b24 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -440,10 +440,10 @@ * * * @param {string|DOMElement} element Element or HTML string to compile into a template function. - * @param {function(angular.Scope[, cloneAttachFn]} transclude function available to directives. + * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives. * @param {number} maxPriority only apply directives lower then given priority (Only effects the * root element(s), not their children) - * @returns {function(scope[, cloneAttachFn])} a link function which is used to bind template + * @returns {function(scope, cloneAttachFn=)} a link function which is used to bind template * (a DOM element/tree) to a scope. Where: * * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to. @@ -521,7 +521,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { * @param {string|Object} name Name of the directive in camel-case (i.e. ngBind which * will match as ng-bind), or an object map of directives where the keys are the * names and the values are the factories. - * @param {function|Array} directiveFactory An injectable directive factory function. See + * @param {Function|Array} directiveFactory An injectable directive factory function. See * {@link guide/directive} for more info. * @returns {ng.$compileProvider} Self for chaining. */ @@ -868,13 +868,13 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { * function, which is the a linking function for the node. * * @param {NodeList} nodeList an array of nodes or NodeList to compile - * @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the + * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the * scope argument is auto-generated to the new child of the transcluded parent scope. * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then * the rootElement must be set the jqLite collection of the compile root. This is * needed so that the jqLite collection items can be replaced with widgets. * @param {number=} maxPriority Max directive priority. - * @returns {?function} A composite linking function of all of the matched directives or null. + * @returns {Function} A composite linking function of all of the matched directives or null. */ function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective, previousCompileContext) { @@ -1118,7 +1118,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { * this needs to be pre-sorted by priority order. * @param {Node} compileNode The raw DOM node to apply the compile functions to * @param {Object} templateAttrs The shared attribute function - * @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the + * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the * scope argument is auto-generated to the new * child of the transcluded parent scope. * @param {JQLite} jqCollection If we are working on the root of the compile tree then this @@ -1130,7 +1130,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { * @param {Array.} postLinkFns * @param {Object} previousCompileContext Context used for previous compilation of the current * node - * @returns linkFn + * @returns {Function} linkFn */ function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn, jqCollection, originalReplaceDirective, preLinkFns, postLinkFns, @@ -1576,7 +1576,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { * * `A': attribute * * `C`: class * * `M`: comment - * @returns true if directive was added. + * @returns {boolean} true if directive was added. */ function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName, endAttrName) { diff --git a/src/ng/filter.js b/src/ng/filter.js index 5010b130..090b32ca 100644 --- a/src/ng/filter.js +++ b/src/ng/filter.js @@ -56,7 +56,7 @@ * Register filter factory function. * * @param {String} name Name of the filter. - * @param {function} fn The filter factory function which is injectable. + * @param {Function} fn The filter factory function which is injectable. */ diff --git a/src/ng/http.js b/src/ng/http.js index 63948196..a19f146d 100644 --- a/src/ng/http.js +++ b/src/ng/http.js @@ -63,7 +63,7 @@ function headersGetter(headers) { * * @param {*} data Data to transform. * @param {function(string=)} headers Http headers getter fn. - * @param {(function|Array.)} fns Function or an array of functions. + * @param {(Function|Array.)} fns Function or an array of functions. * @returns {*} Transformed data. */ function transformData(data, headers, fns) { diff --git a/src/ng/interval.js b/src/ng/interval.js index 5357ac89..9857860d 100644 --- a/src/ng/interval.js +++ b/src/ng/interval.js @@ -42,93 +42,93 @@ function $IntervalProvider() { * @returns {promise} A promise which will be notified on each iteration. * * @example - - - - -
-
- Date format:
- Current time is: -
- Blood 1 : {{blood_1}} - Blood 2 : {{blood_2}} - - - -
-
- -
-
+ * + * + * + * + *
+ *
+ * Date format:
+ * Current time is: + *
+ * Blood 1 : {{blood_1}} + * Blood 2 : {{blood_2}} + * + * + * + *
+ *
+ * + *
+ *
*/ function interval(fn, delay, count, invokeApply) { var setInterval = $window.setInterval, diff --git a/src/ng/q.js b/src/ng/q.js index e7ff26ef..eb3b2bed 100644 --- a/src/ng/q.js +++ b/src/ng/q.js @@ -181,7 +181,7 @@ function $QProvider() { /** * Constructs a promise manager. * - * @param {function(function)} nextTick Function for executing functions in the next turn. + * @param {function(Function)} nextTick Function for executing functions in the next turn. * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for * debugging purposes. * @returns {object} Promise manager. diff --git a/src/ng/rootScope.js b/src/ng/rootScope.js index eb1dade2..4878c3ec 100644 --- a/src/ng/rootScope.js +++ b/src/ng/rootScope.js @@ -394,7 +394,7 @@ function $RootScopeProvider(){ * ``` * * - * @param {string|Function(scope)} obj Evaluated as {@link guide/expression expression}. The + * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The * expression value should evaluate to an object or an array which is observed on each * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the * collection will trigger a call to the `listener`. -- cgit v1.2.3