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

Commit 7dabda1

Browse files
committed
chore(build): Fix all bad jsdoc types. This is step 1 of turning on --jscomp_error checkTypes during the build process
1 parent b0474cb commit 7dabda1

File tree

12 files changed

+45
-45
lines changed

12 files changed

+45
-45
lines changed

src/Angular.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ function angularInit(element, bootstrap) {
11921192
* They must use {@link api/ng.directive:ngApp ngApp}.
11931193
*
11941194
* @param {Element} element DOM element which is the root of angular application.
1195-
* @param {Array<String|Function|Array>=} modules an array of modules to load into the application.
1195+
* @param {Array.<String|Function|Array>=} modules an array of modules to load into the application.
11961196
* Each item in the array should be the name of a predefined module or a (DI annotated)
11971197
* function that will be invoked by the injector as a run block.
11981198
* See: {@link angular.module modules}
@@ -1306,7 +1306,7 @@ function assertNotHasOwnProperty(name, context) {
13061306
* Return the value accessible from the object by path. Any undefined traversals are ignored
13071307
* @param {Object} obj starting object
13081308
* @param {string} path path to traverse
1309-
* @param {boolean=true} bindFnToScope
1309+
* @param {boolean} bindFnToScope defaults to true
13101310
* @returns value as accessible by path
13111311
*/
13121312
//TODO(misko): this function needs to be removed

src/auto/injector.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ function annotate(fn) {
169169
* @description
170170
* Invoke the method and supply the method arguments from the `$injector`.
171171
*
172-
* @param {!function} fn The function to invoke. Function parameters are injected according to the
172+
* @param {!function()} fn The function to invoke. Function parameters are injected according to the
173173
* {@link guide/di $inject Annotation} rules.
174174
* @param {Object=} self The `this` for the invoked method.
175175
* @param {Object=} locals Optional object. If preset then any argument names are read from this
@@ -198,7 +198,7 @@ function annotate(fn) {
198198
* operator and supplies all of the arguments to the constructor function as specified by the
199199
* constructor annotation.
200200
*
201-
* @param {function} Type Annotated constructor function.
201+
* @param {function()} Type Annotated constructor function.
202202
* @param {Object=} locals Optional object. If preset then any argument names are read from this
203203
* object first, before the `$injector` is consulted.
204204
* @returns {Object} new instance of `Type`.
@@ -279,7 +279,7 @@ function annotate(fn) {
279279
* ).toEqual(['$compile', '$rootScope']);
280280
* </pre>
281281
*
282-
* @param {function|Array.<string|Function>} fn Function for which dependent service names need to
282+
* @param {function()|Array.<string|Function>} fn Function for which dependent service names need to
283283
* be retrieved as described above.
284284
*
285285
* @returns {Array.<string>} The names of the services which the function requires.

src/loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ function setupModuleLoader(window) {
277277
* Use this method to register work which should be performed when the injector is done
278278
* loading all modules.
279279
*/
280-
run: function(block) {
281-
runBlocks.push(block);
280+
run: function(initializationFn) {
281+
runBlocks.push(initializationFn);
282282
return this;
283283
}
284284
};

src/ng/animate.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ var $AnimateProvider = ['$provide', function($provide) {
5050
*</pre>
5151
*
5252
* @param {string} name The name of the animation.
53-
* @param {function} factory The factory function that will be executed to return the animation
53+
* @param {function()} factory The factory function that will be executed to return the animation
5454
* object.
5555
*/
5656
this.register = function(name, factory) {
@@ -90,12 +90,12 @@ var $AnimateProvider = ['$provide', function($provide) {
9090
* @function
9191
* @description Inserts the element into the DOM either after the `after` element or within
9292
* the `parent` element. Once complete, the done() callback will be fired (if provided).
93-
* @param {jQuery/jqLite element} element the element which will be inserted into the DOM
94-
* @param {jQuery/jqLite element} parent the parent element which will append the element as
93+
* @param {Object} element the jQuery/jqLite element which will be inserted into the DOM
94+
* @param {Object} parent the parent jQuery/jqLite element which will append the element as
9595
* a child (if the after element is not present)
96-
* @param {jQuery/jqLite element} after the sibling element which will append the element
96+
* @param {Object} after the sibling jQuery/jqLite element which will append the element
9797
* after itself
98-
* @param {function=} done callback function that will be called after the element has been
98+
* @param {function()=} done callback function that will be called after the element has been
9999
* inserted into the DOM
100100
*/
101101
enter : function(element, parent, after, done) {
@@ -118,8 +118,8 @@ var $AnimateProvider = ['$provide', function($provide) {
118118
* @function
119119
* @description Removes the element from the DOM. Once complete, the done() callback will be
120120
* fired (if provided).
121-
* @param {jQuery/jqLite element} element the element which will be removed from the DOM
122-
* @param {function=} done callback function that will be called after the element has been
121+
* @param {Object} element the jQuery/jqLite element which will be removed from the DOM
122+
* @param {function()=} done callback function that will be called after the element has been
123123
* removed from the DOM
124124
*/
125125
leave : function(element, done) {
@@ -137,13 +137,13 @@ var $AnimateProvider = ['$provide', function($provide) {
137137
* either after the `after` element or inside of the `parent` element. Once complete, the
138138
* done() callback will be fired (if provided).
139139
*
140-
* @param {jQuery/jqLite element} element the element which will be moved around within the
140+
* @param {Object} element the jQuery/jqLite element which will be moved around within the
141141
* DOM
142-
* @param {jQuery/jqLite element} parent the parent element where the element will be
142+
* @param {Object} parent the parent jQuery/jqLite element where the element will be
143143
* inserted into (if the after element is not present)
144-
* @param {jQuery/jqLite element} after the sibling element where the element will be
144+
* @param {Object} after the sibling jQuery/jqLite element where the element will be
145145
* positioned next to
146-
* @param {function=} done the callback function (if provided) that will be fired after the
146+
* @param {function()=} done the callback function (if provided) that will be fired after the
147147
* element has been moved to its new position
148148
*/
149149
move : function(element, parent, after, done) {
@@ -160,10 +160,10 @@ var $AnimateProvider = ['$provide', function($provide) {
160160
* @function
161161
* @description Adds the provided className CSS class value to the provided element. Once
162162
* complete, the done() callback will be fired (if provided).
163-
* @param {jQuery/jqLite element} element the element which will have the className value
163+
* @param {Object} element the jQuery/jqLite element which will have the className value
164164
* added to it
165165
* @param {string} className the CSS class which will be added to the element
166-
* @param {function=} done the callback function (if provided) that will be fired after the
166+
* @param {function()=} done the callback function (if provided) that will be fired after the
167167
* className value has been added to the element
168168
*/
169169
addClass : function(element, className, done) {
@@ -184,10 +184,10 @@ var $AnimateProvider = ['$provide', function($provide) {
184184
* @function
185185
* @description Removes the provided className CSS class value from the provided element.
186186
* Once complete, the done() callback will be fired (if provided).
187-
* @param {jQuery/jqLite element} element the element which will have the className value
187+
* @param {Object} element the jQuery/jqLite element which will have the className value
188188
* removed from it
189189
* @param {string} className the CSS class which will be removed from the element
190-
* @param {function=} done the callback function (if provided) that will be fired after the
190+
* @param {function()=} done the callback function (if provided) that will be fired after the
191191
* className value has been removed from the element
192192
*/
193193
removeClass : function(element, className, done) {

src/ng/browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ function Browser(window, document, $log, $sniffer) {
248248
* Returns current <base href>
249249
* (always relative - without domain)
250250
*
251-
* @returns {string=} current <base href>
251+
* @returns {string} current <base href>
252252
*/
253253
self.baseHref = function() {
254254
var href = baseElement.attr('href');

src/ng/compile.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -436,10 +436,10 @@
436436
*
437437
*
438438
* @param {string|DOMElement} element Element or HTML string to compile into a template function.
439-
* @param {function(angular.Scope[, cloneAttachFn]} transclude function available to directives.
439+
* @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives.
440440
* @param {number} maxPriority only apply directives lower then given priority (Only effects the
441441
* root element(s), not their children)
442-
* @returns {function(scope[, cloneAttachFn])} a link function which is used to bind template
442+
* @returns {function(scope, cloneAttachFn=)} a link function which is used to bind template
443443
* (a DOM element/tree) to a scope. Where:
444444
*
445445
* * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.
@@ -517,7 +517,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
517517
* @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which
518518
* will match as <code>ng-bind</code>), or an object map of directives where the keys are the
519519
* names and the values are the factories.
520-
* @param {function|Array} directiveFactory An injectable directive factory function. See
520+
* @param {function()|Array} directiveFactory An injectable directive factory function. See
521521
* {@link guide/directive} for more info.
522522
* @returns {ng.$compileProvider} Self for chaining.
523523
*/
@@ -860,13 +860,13 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
860860
* function, which is the a linking function for the node.
861861
*
862862
* @param {NodeList} nodeList an array of nodes or NodeList to compile
863-
* @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the
863+
* @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the
864864
* scope argument is auto-generated to the new child of the transcluded parent scope.
865865
* @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then
866866
* the rootElement must be set the jqLite collection of the compile root. This is
867867
* needed so that the jqLite collection items can be replaced with widgets.
868868
* @param {number=} max directive priority
869-
* @returns {?function} A composite linking function of all of the matched directives or null.
869+
* @returns {?function()} A composite linking function of all of the matched directives or null.
870870
*/
871871
function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,
872872
previousCompileContext) {
@@ -1109,7 +1109,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
11091109
* this needs to be pre-sorted by priority order.
11101110
* @param {Node} compileNode The raw DOM node to apply the compile functions to
11111111
* @param {Object} templateAttrs The shared attribute function
1112-
* @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the
1112+
* @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the
11131113
* scope argument is auto-generated to the new
11141114
* child of the transcluded parent scope.
11151115
* @param {JQLite} jqCollection If we are working on the root of the compile tree then this

src/ng/filter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
* Register filter factory function.
5858
*
5959
* @param {String} name Name of the filter.
60-
* @param {function} fn The filter factory function which is injectable.
60+
* @param {function()} fn The filter factory function which is injectable.
6161
*/
6262

6363

src/ng/http.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function headersGetter(headers) {
6363
*
6464
* @param {*} data Data to transform.
6565
* @param {function(string=)} headers Http headers getter fn.
66-
* @param {(function|Array.<function>)} fns Function or an array of functions.
66+
* @param {function()|Array.<Function>} fns Function or an array of functions.
6767
* @returns {*} Transformed data.
6868
*/
6969
function transformData(data, headers, fns) {

src/ng/location.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ LocationHashbangInHtml5Url.prototype =
410410
* hash object. Hash object may contain an array of values, which will be decoded as duplicates in
411411
* the url.
412412
*
413-
* @param {(string|Array<string>)=} paramValue If `search` is a string, then `paramValue` will override only a
413+
* @param {(string|Array.<string>)=} paramValue If `search` is a string, then `paramValue` will override only a
414414
* single search parameter. If `paramValue` is an array, it will set the parameter as a
415415
* comma-separated value. If `paramValue` is `null`, the parameter will be deleted.
416416
*

src/ng/q.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ function $QProvider() {
181181
/**
182182
* Constructs a promise manager.
183183
*
184-
* @param {function(function)} nextTick Function for executing functions in the next turn.
185-
* @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for
184+
* @param {function(function())} nextTick Function for executing functions in the next turn.
185+
* @param {function(...[*])} exceptionHandler Function into which unexpected exceptions are passed for
186186
* debugging purposes.
187187
* @returns {object} Promise manager.
188188
*/

src/ng/rootScope.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ function $RootScopeProvider(){
395395
* </pre>
396396
*
397397
*
398-
* @param {string|Function(scope)} obj Evaluated as {@link guide/expression expression}. The
398+
* @param {string|function(Object)} obj Evaluated as {@link guide/expression expression}. The
399399
* expression value should evaluate to an object or an array which is observed on each
400400
* {@link ng.$rootScope.Scope#methods_$digest $digest} cycle. Any shallow change within the
401401
* collection will trigger a call to the `listener`.

src/ngAnimate/animate.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,9 @@ angular.module('ngAnimate', ['ng'])
360360
* | 9. The animation ends and all generated CSS classes are removed from the element | class="my-animation" |
361361
* | 10. The doneCallback() callback is fired (if provided) | class="my-animation" |
362362
*
363-
* @param {jQuery/jqLite element} element the element that will be the focus of the enter animation
364-
* @param {jQuery/jqLite element} parentElement the parent element of the element that will be the focus of the enter animation
365-
* @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
363+
* @param {Object} element the jQuery/jqLite element that will be the focus of the enter animation
364+
* @param {Object} parentElement the parent jQuery/jqLite element of the element that will be the focus of the enter animation
365+
* @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
366366
* @param {function()=} doneCallback the callback function that will be called once the animation is complete
367367
*/
368368
enter : function(element, parentElement, afterElement, doneCallback) {
@@ -398,7 +398,7 @@ angular.module('ngAnimate', ['ng'])
398398
* | 9. The element is removed from the DOM | ... |
399399
* | 10. The doneCallback() callback is fired (if provided) | ... |
400400
*
401-
* @param {jQuery/jqLite element} element the element that will be the focus of the leave animation
401+
* @param {Object} element the jQuery/jqLite element that will be the focus of the leave animation
402402
* @param {function()=} doneCallback the callback function that will be called once the animation is complete
403403
*/
404404
leave : function(element, doneCallback) {
@@ -437,9 +437,9 @@ angular.module('ngAnimate', ['ng'])
437437
* | 9. The animation ends and all generated CSS classes are removed from the element | class="my-animation" |
438438
* | 10. The doneCallback() callback is fired (if provided) | class="my-animation" |
439439
*
440-
* @param {jQuery/jqLite element} element the element that will be the focus of the move animation
441-
* @param {jQuery/jqLite element} parentElement the parentElement element of the element that will be the focus of the move animation
442-
* @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
440+
* @param {Object} element the jQuery/jqLite element that will be the focus of the move animation
441+
* @param {Object} parentElement the parent jQuery/jqLite element of the element that will be the focus of the move animation
442+
* @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
443443
* @param {function()=} doneCallback the callback function that will be called once the animation is complete
444444
*/
445445
move : function(element, parentElement, afterElement, doneCallback) {
@@ -477,7 +477,7 @@ angular.module('ngAnimate', ['ng'])
477477
* | 9. The super class is kept on the element | class="my-animation super" |
478478
* | 10. The doneCallback() callback is fired (if provided) | class="my-animation super" |
479479
*
480-
* @param {jQuery/jqLite element} element the element that will be animated
480+
* @param {Object} element the jQuery/jqLite element that will be animated
481481
* @param {string} className the CSS class that will be added to the element and then animated
482482
* @param {function()=} doneCallback the callback function that will be called once the animation is complete
483483
*/
@@ -513,7 +513,7 @@ angular.module('ngAnimate', ['ng'])
513513
* | 9. The doneCallback() callback is fired (if provided) | class="my-animation" |
514514
*
515515
*
516-
* @param {jQuery/jqLite element} element the element that will be animated
516+
* @param {Object} element the jQuery/jqLite element that will be animated
517517
* @param {string} className the CSS class that will be animated and then removed from the element
518518
* @param {function()=} doneCallback the callback function that will be called once the animation is complete
519519
*/
@@ -530,7 +530,7 @@ angular.module('ngAnimate', ['ng'])
530530
* @function
531531
*
532532
* @param {boolean=} value If provided then set the animation on or off.
533-
* @param {jQuery/jqLite element=} element If provided then the element will be used to represent the enable/disable operation
533+
* @param {Object=} element Options jQuery/jqLite element to represent the enable/disable operation
534534
* @return {boolean} Current animation state.
535535
*
536536
* @description

0 commit comments

Comments
 (0)