Skip to content

Commit

Permalink
add visibility annotations for utterance-queue, phetsims/chipper#932
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed May 7, 2020
1 parent b0aa90b commit 79db189
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/Utterance.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ class Utterance {
* BEWARE! Why does the delay time need to be changed during the lifetime of an Utterance? It did for
* https://github.com/phetsims/gravity-force-lab-basics/issues/146, but does it for you? Be sure there is good
* reason changing this value.
* @public
*
* @param {number} delay
*/
setAlertStableDelay( delay ) {
Expand All @@ -160,6 +162,7 @@ class Utterance {

/**
* Reset variables that track instance variables related to time.
* @public
* @returns {}
*/
resetTimingVariables() {
Expand Down
5 changes: 5 additions & 0 deletions js/UtteranceQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class UtteranceQueue extends PhetioObject {

/**
* Convenience function to help with nullable values. No-op if null or nothing is passed in
* @public
* @param {null|AlertableDef} [utterance]
*/
addToBackIfDefined( utterance ) {
Expand All @@ -109,6 +110,7 @@ class UtteranceQueue extends PhetioObject {

/**
* Add an utterance to the front of the queue to be read immediately.
* @public
* @param {AlertableDef} utterance
*/
addToFront( utterance ) {
Expand All @@ -125,6 +127,7 @@ class UtteranceQueue extends PhetioObject {

/**
* Create an Utterance for the queue in case of string and clears the queue of duplicate utterances.
* @private
*
* @param {AlertableDef} utterance
* @returns {Utterance}
Expand Down Expand Up @@ -242,6 +245,7 @@ class UtteranceQueue extends PhetioObject {
/**
* Set whether or not the utterance queue is muted. When muted, Utterances will still
* move through the queue, but nothing will be sent to assistive technology.
* @public
*
* @param {boolean} isMuted
*/
Expand All @@ -265,6 +269,7 @@ class UtteranceQueue extends PhetioObject {
/**
* Set whether or not the utterance queue is enabled. When enabled, Utterances cannot be added to
* the queue, and the Queue cannot be cleared. Also nothing will be sent to assistive technology.
* @public
*
* @param {boolean} isEnabled
*/
Expand Down

0 comments on commit 79db189

Please sign in to comment.