Skip to content

Commit

Permalink
update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
tasxatzial committed Apr 18, 2024
1 parent f1dd74d commit bfd0d56
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/js/animationFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import KeyboardUtils from './keyboardUtils.js';
* @param {Function} onHoldComplete
* Runs when the hold phase is completed or cancelled.
* @param {number} duration
* Time in ms needed for a completed (not cancelled) hold phase.
* Required duration (ms) for a completed (not cancelled) hold phase.
* @return {ClickAndHoldAPI}
* @throws {Error}
* If the element already has click-and-hold functionality.
Expand Down
10 changes: 8 additions & 2 deletions src/js/transition.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import KeyboardUtils from './keyboardUtils.js';

/**
* Runs when the hold phase is completed or cancelled.
* @callback onHoldComplete
* @param {boolean} isComplete
* True only if the hold phase has been completed, else false.
*/

/**
* The returned object of {@link ClickAndHold}.
Expand Down Expand Up @@ -30,9 +36,9 @@ import KeyboardUtils from './keyboardUtils.js';
* @param {HTMLElement} element
* The target click-and-hold element.
* @param {Function} onHoldComplete
* Runs when the hold phase is completed (not cancelled).
* Runs when the hold phase is completed or cancelled.
* @param {number} duration
* Time in ms needed to trigger onHoldCompleted.
* Required duration (ms) for a completed (not cancelled) hold phase.
* @return {ClickAndHoldAPI}
* @throws {Error}
* If the element already has click-and-hold functionality.
Expand Down

0 comments on commit bfd0d56

Please sign in to comment.