Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

chore(build): Fix all bad jsdoc types #5412

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ function angularInit(element, bootstrap) {
* They must use {@link api/ng.directive:ngApp ngApp}.
*
* @param {Element} element DOM element which is the root of angular application.
* @param {Array<String|Function|Array>=} modules an array of modules to load into the application.
* @param {Array.<String|Function|Array>=} modules an array of modules to load into the application.
* Each item in the array should be the name of a predefined module or a (DI annotated)
* function that will be invoked by the injector as a run block.
* See: {@link angular.module modules}
Expand Down Expand Up @@ -1306,7 +1306,7 @@ function assertNotHasOwnProperty(name, context) {
* Return the value accessible from the object by path. Any undefined traversals are ignored
* @param {Object} obj starting object
* @param {string} path path to traverse
* @param {boolean=true} bindFnToScope
* @param {boolean} bindFnToScope defaults to true
* @returns value as accessible by path
*/
//TODO(misko): this function needs to be removed
Expand Down
6 changes: 3 additions & 3 deletions src/auto/injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function annotate(fn) {
* @description
* Invoke the method and supply the method arguments from the `$injector`.
*
* @param {!function} fn The function to invoke. Function parameters are injected according to the
* @param {!function()} fn The function to invoke. Function parameters are injected according to the
* {@link guide/di $inject Annotation} rules.
* @param {Object=} self The `this` for the invoked method.
* @param {Object=} locals Optional object. If preset then any argument names are read from this
Expand Down Expand Up @@ -198,7 +198,7 @@ function annotate(fn) {
* operator and supplies all of the arguments to the constructor function as specified by the
* constructor annotation.
*
* @param {function} Type Annotated constructor function.
* @param {function()} Type Annotated constructor function.
* @param {Object=} locals Optional object. If preset then any argument names are read from this
* object first, before the `$injector` is consulted.
* @returns {Object} new instance of `Type`.
Expand Down Expand Up @@ -279,7 +279,7 @@ function annotate(fn) {
* ).toEqual(['$compile', '$rootScope']);
* </pre>
*
* @param {function|Array.<string|Function>} fn Function for which dependent service names need to
* @param {function()|Array.<string|Function>} fn Function for which dependent service names need to
* be retrieved as described above.
*
* @returns {Array.<string>} The names of the services which the function requires.
Expand Down
4 changes: 2 additions & 2 deletions src/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ function setupModuleLoader(window) {
* Use this method to register work which should be performed when the injector is done
* loading all modules.
*/
run: function(block) {
runBlocks.push(block);
run: function(initializationFn) {
runBlocks.push(initializationFn);
return this;
}
};
Expand Down
30 changes: 15 additions & 15 deletions src/ng/animate.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var $AnimateProvider = ['$provide', function($provide) {
*</pre>
*
* @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) {
Expand Down Expand Up @@ -90,12 +90,12 @@ var $AnimateProvider = ['$provide', function($provide) {
* @function
* @description Inserts the element into the DOM either after the `after` element or within
* the `parent` element. Once complete, the done() callback will be fired (if provided).
* @param {jQuery/jqLite element} element the element which will be inserted into the DOM
* @param {jQuery/jqLite element} parent the parent element which will append the element as
* @param {Object} element the jQuery/jqLite element which will be inserted into the DOM
* @param {Object} parent the parent jQuery/jqLite element which will append the element as
* a child (if the after element is not present)
* @param {jQuery/jqLite element} after the sibling element which will append the element
* @param {Object} after the sibling jQuery/jqLite 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) {
Expand All @@ -118,8 +118,8 @@ var $AnimateProvider = ['$provide', function($provide) {
* @function
* @description Removes the element from the DOM. Once complete, the done() callback will be
* fired (if provided).
* @param {jQuery/jqLite element} 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 {Object} element the jQuery/jqLite element which will be removed from the DOM
* @param {function()=} done callback function that will be called after the element has been
* removed from the DOM
*/
leave : function(element, done) {
Expand All @@ -137,13 +137,13 @@ var $AnimateProvider = ['$provide', function($provide) {
* either after the `after` element or inside of the `parent` element. Once complete, the
* done() callback will be fired (if provided).
*
* @param {jQuery/jqLite element} element the element which will be moved around within the
* @param {Object} element the jQuery/jqLite element which will be moved around within the
* DOM
* @param {jQuery/jqLite element} parent the parent element where the element will be
* @param {Object} parent the parent jQuery/jqLite element where the element will be
* inserted into (if the after element is not present)
* @param {jQuery/jqLite element} after the sibling element where the element will be
* @param {Object} after the sibling jQuery/jqLite 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) {
Expand All @@ -160,10 +160,10 @@ var $AnimateProvider = ['$provide', function($provide) {
* @function
* @description Adds the provided className CSS class value to the provided element. Once
* complete, the done() callback will be fired (if provided).
* @param {jQuery/jqLite element} element the element which will have the className value
* @param {Object} element the jQuery/jqLite 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) {
Expand All @@ -184,10 +184,10 @@ var $AnimateProvider = ['$provide', function($provide) {
* @function
* @description Removes the provided className CSS class value from the provided element.
* Once complete, the done() callback will be fired (if provided).
* @param {jQuery/jqLite element} element the element which will have the className value
* @param {Object} element the jQuery/jqLite 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) {
Expand Down
2 changes: 1 addition & 1 deletion src/ng/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ function Browser(window, document, $log, $sniffer) {
* Returns current <base href>
* (always relative - without domain)
*
* @returns {string=} current <base href>
* @returns {string} current <base href>
*/
self.baseHref = function() {
var href = baseElement.attr('href');
Expand Down
12 changes: 6 additions & 6 deletions src/ng/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,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.
Expand Down Expand Up @@ -517,7 +517,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
* @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which
* will match as <code>ng-bind</code>), 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.
*/
Expand Down Expand Up @@ -860,13 +860,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=} 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) {
Expand Down Expand Up @@ -1109,7 +1109,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
Expand Down
2 changes: 1 addition & 1 deletion src/ng/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,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.
*/


Expand Down
2 changes: 1 addition & 1 deletion src/ng/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function headersGetter(headers) {
*
* @param {*} data Data to transform.
* @param {function(string=)} headers Http headers getter fn.
* @param {(function|Array.<function>)} fns Function or an array of functions.
* @param {function()|Array.<Function>} fns Function or an array of functions.
* @returns {*} Transformed data.
*/
function transformData(data, headers, fns) {
Expand Down
2 changes: 1 addition & 1 deletion src/ng/location.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ LocationHashbangInHtml5Url.prototype =
* hash object. Hash object may contain an array of values, which will be decoded as duplicates in
* the url.
*
* @param {(string|Array<string>)=} paramValue If `search` is a string, then `paramValue` will override only a
* @param {(string|Array.<string>)=} paramValue If `search` is a string, then `paramValue` will override only a
* single search parameter. If `paramValue` is an array, it will set the parameter as a
* comma-separated value. If `paramValue` is `null`, the parameter will be deleted.
*
Expand Down
4 changes: 2 additions & 2 deletions src/ng/q.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ function $QProvider() {
/**
* Constructs a promise manager.
*
* @param {function(function)} nextTick Function for executing functions in the next turn.
* @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for
* @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.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/ng/rootScope.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ function $RootScopeProvider(){
* </pre>
*
*
* @param {string|Function(scope)} obj Evaluated as {@link guide/expression expression}. The
* @param {string|function(Object)} 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#methods_$digest $digest} cycle. Any shallow change within the
* collection will trigger a call to the `listener`.
Expand Down
20 changes: 10 additions & 10 deletions src/ngAnimate/animate.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,9 @@ angular.module('ngAnimate', ['ng'])
* | 9. The animation ends and all generated CSS classes are removed from the element | class="my-animation" |
* | 10. The doneCallback() callback is fired (if provided) | class="my-animation" |
*
* @param {jQuery/jqLite element} element the element that will be the focus of the enter animation
* @param {jQuery/jqLite element} parentElement the parent element of the element that will be the focus of the enter animation
* @param {jQuery/jqLite element} afterElement the sibling element (which is the previous element) of the element that will be the focus of the enter animation
* @param {Object} element the jQuery/jqLite element that will be the focus of the enter animation
* @param {Object} parentElement the parent jQuery/jqLite element of the element that will be the focus of the enter animation
* @param {Object} afterElement the sibling jQuery/jqLite element (which is the previous element) of the element that will be the focus of the enter animation
* @param {function()=} doneCallback the callback function that will be called once the animation is complete
*/
enter : function(element, parentElement, afterElement, doneCallback) {
Expand Down Expand Up @@ -398,7 +398,7 @@ angular.module('ngAnimate', ['ng'])
* | 9. The element is removed from the DOM | ... |
* | 10. The doneCallback() callback is fired (if provided) | ... |
*
* @param {jQuery/jqLite element} element the element that will be the focus of the leave animation
* @param {Object} element the jQuery/jqLite element that will be the focus of the leave animation
* @param {function()=} doneCallback the callback function that will be called once the animation is complete
*/
leave : function(element, doneCallback) {
Expand Down Expand Up @@ -437,9 +437,9 @@ angular.module('ngAnimate', ['ng'])
* | 9. The animation ends and all generated CSS classes are removed from the element | class="my-animation" |
* | 10. The doneCallback() callback is fired (if provided) | class="my-animation" |
*
* @param {jQuery/jqLite element} element the element that will be the focus of the move animation
* @param {jQuery/jqLite element} parentElement the parentElement element of the element that will be the focus of the move animation
* @param {jQuery/jqLite element} afterElement the sibling element (which is the previous element) of the element that will be the focus of the move animation
* @param {Object} element the jQuery/jqLite element that will be the focus of the move animation
* @param {Object} parentElement the parent jQuery/jqLite element of the element that will be the focus of the move animation
* @param {Object} afterElement the sibling jQuery/jqLite element (which is the previous element) of the element that will be the focus of the move animation
* @param {function()=} doneCallback the callback function that will be called once the animation is complete
*/
move : function(element, parentElement, afterElement, doneCallback) {
Expand Down Expand Up @@ -477,7 +477,7 @@ angular.module('ngAnimate', ['ng'])
* | 9. The super class is kept on the element | class="my-animation super" |
* | 10. The doneCallback() callback is fired (if provided) | class="my-animation super" |
*
* @param {jQuery/jqLite element} element the element that will be animated
* @param {Object} element the jQuery/jqLite element that will be animated
* @param {string} className the CSS class that will be added to the element and then animated
* @param {function()=} doneCallback the callback function that will be called once the animation is complete
*/
Expand Down Expand Up @@ -513,7 +513,7 @@ angular.module('ngAnimate', ['ng'])
* | 9. The doneCallback() callback is fired (if provided) | class="my-animation" |
*
*
* @param {jQuery/jqLite element} element the element that will be animated
* @param {Object} element the jQuery/jqLite element that will be animated
* @param {string} className the CSS class that will be animated and then removed from the element
* @param {function()=} doneCallback the callback function that will be called once the animation is complete
*/
Expand All @@ -530,7 +530,7 @@ angular.module('ngAnimate', ['ng'])
* @function
*
* @param {boolean=} value If provided then set the animation on or off.
* @param {jQuery/jqLite element=} element If provided then the element will be used to represent the enable/disable operation
* @param {Object=} element Options jQuery/jqLite element to represent the enable/disable operation
* @return {boolean} Current animation state.
*
* @description
Expand Down