Skip to content

Commit

Permalink
docs(*): fix jsdoc type expressions
Browse files Browse the repository at this point in the history
These errors in the docs were preventing some parts of the docs from being
parsed.
  • Loading branch information
petebacondarwin committed Feb 26, 2014
1 parent 30c8207 commit 332e935
Show file tree
Hide file tree
Showing 15 changed files with 123 additions and 123 deletions.
12 changes: 6 additions & 6 deletions src/Angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ function reverseParams(iteratorFn) {
* the number string gets longer over time, and it can also overflow, where as the nextId
* will grow much slower, it is a string, and it will never overflow.
*
* @returns an unique alpha-numeric string
* @returns {string} an unique alpha-numeric string
*/
function nextUid() {
var index = uid.length;
Expand Down Expand Up @@ -1053,7 +1053,7 @@ function tryDecodeURIComponent(value) {

/**
* Parses an escaped url query string into key-value pairs.
* @returns Object.<(string|boolean)>
* @returns {Object.<string,boolean|Array>}
*/
function parseKeyValue(/**string*/keyValue) {
var obj = {}, key_value, key;
Expand Down Expand Up @@ -1349,9 +1349,9 @@ 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
* @returns value as accessible by path
* @param {String} path path to traverse
* @param {boolean} [bindFnToScope=true]
* @returns {Object} value as accessible by path
*/
//TODO(misko): this function needs to be removed
function getter(obj, path, bindFnToScope) {
Expand All @@ -1376,7 +1376,7 @@ function getter(obj, path, bindFnToScope) {
/**
* Return the DOM siblings between the first and last node in the given array.
* @param {Array} array like object
* @returns jQlite object containing the elements
* @returns {DOMElement} object containing the elements
*/
function getBlockElements(nodes) {
var startNode = nodes[0],
Expand Down
2 changes: 1 addition & 1 deletion src/apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ HashMap.prototype = {

/**
* @param key
* @returns the value for the key
* @returns {Object} the value for the key
*/
get: function(key) {
return this[hashKey(key)];
Expand Down
6 changes: 3 additions & 3 deletions src/auto/injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,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 All @@ -195,7 +195,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 @@ -275,7 +275,7 @@ function annotate(fn) {
* ).toEqual(['$compile', '$rootScope']);
* ```
*
* @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
2 changes: 1 addition & 1 deletion src/minErr.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* should all be static strings, not variables or general expressions.
*
* @param {string} module The namespace to use for the new minErr instance.
* @returns {function(string, string, ...): Error} instance
* @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance
*/

function minErr(module) {
Expand Down
14 changes: 7 additions & 7 deletions src/ng/animate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/ng/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ function Browser(window, document, $log, $sniffer) {
* Returns current <base href>
* (always relative - without domain)
*
* @returns {string=} current <base href>
* @returns {string} The current base href
*/
self.baseHref = function() {
var href = baseElement.attr('href');
Expand Down
16 changes: 8 additions & 8 deletions src/ng/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -521,7 +521,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 @@ -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) {
Expand Down Expand Up @@ -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
Expand All @@ -1130,7 +1130,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
* @param {Array.<Function>} 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,
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/ng/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/


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
Loading

0 comments on commit 332e935

Please sign in to comment.