Skip to content

Commit

Permalink
jsdoc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Jan 21, 2021
1 parent 994a511 commit 52e12b8
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/js/mixins/evented.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ const isValidEventType = (type) =>
*
* @param {Object} target
* The object to test.
*
* @param {Object} obj
* The evented object we are validating for
*
* @param {string} fnName
* The name of the evented mixin function that called this.
*/
const validateTarget = (target, obj, fnName) => {
if (!target || (!target.nodeName && !isEvented(target))) {
Expand All @@ -103,6 +109,12 @@ const validateTarget = (target, obj, fnName) => {
*
* @param {string|Array} type
* The type to test.
*
* @param {Object} obj
* The evented object we are validating for
*
* @param {string} fnName
* The name of the evented mixin function that called this.
*/
const validateEventType = (type, obj, fnName) => {
if (!isValidEventType(type)) {
Expand All @@ -119,6 +131,12 @@ const validateEventType = (type, obj, fnName) => {
*
* @param {Function} listener
* The listener to test.
*
* @param {Object} obj
* The evented object we are validating for
*
* @param {string} fnName
* The name of the evented mixin function that called this.
*/
const validateListener = (listener, obj, fnName) => {
if (typeof listener !== 'function') {
Expand All @@ -138,6 +156,9 @@ const validateListener = (listener, obj, fnName) => {
* @param {Array} args
* An array of arguments passed to `on()` or `one()`.
*
* @param {string} fnName
* The name of the evented mixin function that called this.
*
* @return {Object}
* An object containing useful values for `on()` or `one()` calls.
*/
Expand Down

0 comments on commit 52e12b8

Please sign in to comment.