Skip to content

Commit

Permalink
add return types to ValueChangeSoundGenerator methods, phetsims/sun#697
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Mar 23, 2022
1 parent acdc4c8 commit 2db73fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/sound-generators/ValueChangeSoundGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ class ValueChangeSoundGenerator extends SoundGenerator {
* Check if the new value has reached threshold and, if so, play the appropriate sound. If no threshold has been
* reached or crossed and the new value is not at the min or max, no sound will be played.
*/
playSoundIfThresholdReached( newValue: number, oldValue: number ) {
playSoundIfThresholdReached( newValue: number, oldValue: number ): void {
if ( newValue !== oldValue ) {
const constrainedNewValue = this.constrainValue( newValue );
const constrainedOldValue = this.constrainValue( oldValue );
Expand All @@ -246,7 +246,7 @@ class ValueChangeSoundGenerator extends SoundGenerator {
* Play the appropriate sound for the change in value indicated by the provided new and old values. This will almost
* always play a sound, but there are some exceptions. See the code and comments for details.
*/
playSoundForValueChange( newValue: number, oldValue: number ) {
playSoundForValueChange( newValue: number, oldValue: number ): void {
const constrainedNewValue = this.constrainValue( newValue );
const constrainedOldValue = this.constrainValue( oldValue );
if ( constrainedNewValue !== constrainedOldValue ||
Expand Down

0 comments on commit 2db73fb

Please sign in to comment.