Skip to content

Commit

Permalink
Add some @function annotations to APIs that are defined by assignment.
Browse files Browse the repository at this point in the history
This helps analyzer understand when something is a function despite not
having any function-looking syntax on the right-hand-side.
  • Loading branch information
aomarks committed Nov 29, 2017
1 parent fbebc59 commit 29f2a0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/utils/array-splice.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@
* perform the more expensive minimum edit distance calculation over the
* non-shared portions of the arrays.
*
* @function
* @memberof Polymer.ArraySplice
* @param {Array} current The "changed" array for which splices will be
* calculated.
Expand All @@ -312,4 +313,4 @@
};

})();
</script>
</script>
4 changes: 4 additions & 0 deletions lib/utils/async.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
/**
* Enqueues a function called in the next task.
*
* @function
* @memberof Polymer.Async.timeOut
* @param {Function} fn Callback to run
* @return {number} Handle used for canceling task
Expand All @@ -87,6 +88,7 @@
/**
* Cancels a previously enqueued `timeOut` callback.
*
* @function
* @memberof Polymer.Async.timeOut
* @param {number} handle Handle returned from `run` of callback to cancel
*/
Expand All @@ -104,6 +106,7 @@
/**
* Enqueues a function called at `requestAnimationFrame` timing.
*
* @function
* @memberof Polymer.Async.animationFrame
* @param {Function} fn Callback to run
* @return {number} Handle used for canceling task
Expand All @@ -112,6 +115,7 @@
/**
* Cancels a previously enqueued `animationFrame` callback.
*
* @function
* @memberof Polymer.Async.timeOut
* @param {number} handle Handle returned from `run` of callback to cancel
*/
Expand Down

0 comments on commit 29f2a0e

Please sign in to comment.