Skip to content

Commit 332e935

Browse files
docs(*): fix jsdoc type expressions
These errors in the docs were preventing some parts of the docs from being parsed.
1 parent 30c8207 commit 332e935

15 files changed

+123
-123
lines changed

src/Angular.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ function reverseParams(iteratorFn) {
289289
* the number string gets longer over time, and it can also overflow, where as the nextId
290290
* will grow much slower, it is a string, and it will never overflow.
291291
*
292-
* @returns an unique alpha-numeric string
292+
* @returns {string} an unique alpha-numeric string
293293
*/
294294
function nextUid() {
295295
var index = uid.length;
@@ -1053,7 +1053,7 @@ function tryDecodeURIComponent(value) {
10531053

10541054
/**
10551055
* Parses an escaped url query string into key-value pairs.
1056-
* @returns Object.<(string|boolean)>
1056+
* @returns {Object.<string,boolean|Array>}
10571057
*/
10581058
function parseKeyValue(/**string*/keyValue) {
10591059
var obj = {}, key_value, key;
@@ -1349,9 +1349,9 @@ function assertNotHasOwnProperty(name, context) {
13491349
/**
13501350
* Return the value accessible from the object by path. Any undefined traversals are ignored
13511351
* @param {Object} obj starting object
1352-
* @param {string} path path to traverse
1353-
* @param {boolean=true} bindFnToScope
1354-
* @returns value as accessible by path
1352+
* @param {String} path path to traverse
1353+
* @param {boolean} [bindFnToScope=true]
1354+
* @returns {Object} value as accessible by path
13551355
*/
13561356
//TODO(misko): this function needs to be removed
13571357
function getter(obj, path, bindFnToScope) {
@@ -1376,7 +1376,7 @@ function getter(obj, path, bindFnToScope) {
13761376
/**
13771377
* Return the DOM siblings between the first and last node in the given array.
13781378
* @param {Array} array like object
1379-
* @returns jQlite object containing the elements
1379+
* @returns {DOMElement} object containing the elements
13801380
*/
13811381
function getBlockElements(nodes) {
13821382
var startNode = nodes[0],

src/apis.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ HashMap.prototype = {
4949

5050
/**
5151
* @param key
52-
* @returns the value for the key
52+
* @returns {Object} the value for the key
5353
*/
5454
get: function(key) {
5555
return this[hashKey(key)];

src/auto/injector.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function annotate(fn) {
168168
* @description
169169
* Invoke the method and supply the method arguments from the `$injector`.
170170
*
171-
* @param {!function} fn The function to invoke. Function parameters are injected according to the
171+
* @param {!Function} fn The function to invoke. Function parameters are injected according to the
172172
* {@link guide/di $inject Annotation} rules.
173173
* @param {Object=} self The `this` for the invoked method.
174174
* @param {Object=} locals Optional object. If preset then any argument names are read from this
@@ -195,7 +195,7 @@ function annotate(fn) {
195195
* operator and supplies all of the arguments to the constructor function as specified by the
196196
* constructor annotation.
197197
*
198-
* @param {function} Type Annotated constructor function.
198+
* @param {Function} Type Annotated constructor function.
199199
* @param {Object=} locals Optional object. If preset then any argument names are read from this
200200
* object first, before the `$injector` is consulted.
201201
* @returns {Object} new instance of `Type`.
@@ -275,7 +275,7 @@ function annotate(fn) {
275275
* ).toEqual(['$compile', '$rootScope']);
276276
* ```
277277
*
278-
* @param {function|Array.<string|Function>} fn Function for which dependent service names need to
278+
* @param {Function|Array.<string|Function>} fn Function for which dependent service names need to
279279
* be retrieved as described above.
280280
*
281281
* @returns {Array.<string>} The names of the services which the function requires.

src/minErr.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* should all be static strings, not variables or general expressions.
2626
*
2727
* @param {string} module The namespace to use for the new minErr instance.
28-
* @returns {function(string, string, ...): Error} instance
28+
* @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance
2929
*/
3030

3131
function minErr(module) {

src/ng/animate.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var $AnimateProvider = ['$provide', function($provide) {
4949
* ```
5050
*
5151
* @param {string} name The name of the animation.
52-
* @param {function} factory The factory function that will be executed to return the animation
52+
* @param {Function} factory The factory function that will be executed to return the animation
5353
* object.
5454
*/
5555
this.register = function(name, factory) {
@@ -118,7 +118,7 @@ var $AnimateProvider = ['$provide', function($provide) {
118118
* a child (if the after element is not present)
119119
* @param {DOMElement} after the sibling element which will append the element
120120
* after itself
121-
* @param {function=} done callback function that will be called after the element has been
121+
* @param {Function=} done callback function that will be called after the element has been
122122
* inserted into the DOM
123123
*/
124124
enter : function(element, parent, after, done) {
@@ -141,7 +141,7 @@ var $AnimateProvider = ['$provide', function($provide) {
141141
* @description Removes the element from the DOM. Once complete, the done() callback will be
142142
* fired (if provided).
143143
* @param {DOMElement} element the element which will be removed from the DOM
144-
* @param {function=} done callback function that will be called after the element has been
144+
* @param {Function=} done callback function that will be called after the element has been
145145
* removed from the DOM
146146
*/
147147
leave : function(element, done) {
@@ -164,7 +164,7 @@ var $AnimateProvider = ['$provide', function($provide) {
164164
* inserted into (if the after element is not present)
165165
* @param {DOMElement} after the sibling element where the element will be
166166
* positioned next to
167-
* @param {function=} done the callback function (if provided) that will be fired after the
167+
* @param {Function=} done the callback function (if provided) that will be fired after the
168168
* element has been moved to its new position
169169
*/
170170
move : function(element, parent, after, done) {
@@ -183,7 +183,7 @@ var $AnimateProvider = ['$provide', function($provide) {
183183
* @param {DOMElement} element the element which will have the className value
184184
* added to it
185185
* @param {string} className the CSS class which will be added to the element
186-
* @param {function=} done the callback function (if provided) that will be fired after the
186+
* @param {Function=} done the callback function (if provided) that will be fired after the
187187
* className value has been added to the element
188188
*/
189189
addClass : function(element, className, done) {
@@ -206,7 +206,7 @@ var $AnimateProvider = ['$provide', function($provide) {
206206
* @param {DOMElement} element the element which will have the className value
207207
* removed from it
208208
* @param {string} className the CSS class which will be removed from the element
209-
* @param {function=} done the callback function (if provided) that will be fired after the
209+
* @param {Function=} done the callback function (if provided) that will be fired after the
210210
* className value has been removed from the element
211211
*/
212212
removeClass : function(element, className, done) {
@@ -230,7 +230,7 @@ var $AnimateProvider = ['$provide', function($provide) {
230230
* removed from it
231231
* @param {string} add the CSS classes which will be added to the element
232232
* @param {string} remove the CSS class which will be removed from the element
233-
* @param {function=} done the callback function (if provided) that will be fired after the
233+
* @param {Function=} done the callback function (if provided) that will be fired after the
234234
* CSS classes have been set on the element
235235
*/
236236
setClass : function(element, add, remove, done) {

src/ng/browser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ function Browser(window, document, $log, $sniffer) {
245245
* Returns current <base href>
246246
* (always relative - without domain)
247247
*
248-
* @returns {string=} current <base href>
248+
* @returns {string} The current base href
249249
*/
250250
self.baseHref = function() {
251251
var href = baseElement.attr('href');

src/ng/compile.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -440,10 +440,10 @@
440440
*
441441
*
442442
* @param {string|DOMElement} element Element or HTML string to compile into a template function.
443-
* @param {function(angular.Scope[, cloneAttachFn]} transclude function available to directives.
443+
* @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives.
444444
* @param {number} maxPriority only apply directives lower then given priority (Only effects the
445445
* root element(s), not their children)
446-
* @returns {function(scope[, cloneAttachFn])} a link function which is used to bind template
446+
* @returns {function(scope, cloneAttachFn=)} a link function which is used to bind template
447447
* (a DOM element/tree) to a scope. Where:
448448
*
449449
* * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.
@@ -521,7 +521,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
521521
* @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which
522522
* will match as <code>ng-bind</code>), or an object map of directives where the keys are the
523523
* names and the values are the factories.
524-
* @param {function|Array} directiveFactory An injectable directive factory function. See
524+
* @param {Function|Array} directiveFactory An injectable directive factory function. See
525525
* {@link guide/directive} for more info.
526526
* @returns {ng.$compileProvider} Self for chaining.
527527
*/
@@ -868,13 +868,13 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
868868
* function, which is the a linking function for the node.
869869
*
870870
* @param {NodeList} nodeList an array of nodes or NodeList to compile
871-
* @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the
871+
* @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the
872872
* scope argument is auto-generated to the new child of the transcluded parent scope.
873873
* @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then
874874
* the rootElement must be set the jqLite collection of the compile root. This is
875875
* needed so that the jqLite collection items can be replaced with widgets.
876876
* @param {number=} maxPriority Max directive priority.
877-
* @returns {?function} A composite linking function of all of the matched directives or null.
877+
* @returns {Function} A composite linking function of all of the matched directives or null.
878878
*/
879879
function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,
880880
previousCompileContext) {
@@ -1118,7 +1118,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
11181118
* this needs to be pre-sorted by priority order.
11191119
* @param {Node} compileNode The raw DOM node to apply the compile functions to
11201120
* @param {Object} templateAttrs The shared attribute function
1121-
* @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the
1121+
* @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the
11221122
* scope argument is auto-generated to the new
11231123
* child of the transcluded parent scope.
11241124
* @param {JQLite} jqCollection If we are working on the root of the compile tree then this
@@ -1130,7 +1130,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
11301130
* @param {Array.<Function>} postLinkFns
11311131
* @param {Object} previousCompileContext Context used for previous compilation of the current
11321132
* node
1133-
* @returns linkFn
1133+
* @returns {Function} linkFn
11341134
*/
11351135
function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,
11361136
jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,
@@ -1576,7 +1576,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
15761576
* * `A': attribute
15771577
* * `C`: class
15781578
* * `M`: comment
1579-
* @returns true if directive was added.
1579+
* @returns {boolean} true if directive was added.
15801580
*/
15811581
function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,
15821582
endAttrName) {

src/ng/filter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
* Register filter factory function.
5757
*
5858
* @param {String} name Name of the filter.
59-
* @param {function} fn The filter factory function which is injectable.
59+
* @param {Function} fn The filter factory function which is injectable.
6060
*/
6161

6262

src/ng/http.js

+1-1
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) {

0 commit comments

Comments
 (0)