Skip to content

Commit

Permalink
add type expressions, #176
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Sep 21, 2021
1 parent 4b3d1ad commit f69c46d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 16 deletions.
6 changes: 3 additions & 3 deletions js/waveGame/model/AmplitudesGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ class AmplitudesGenerator {
}, options );

// @private
this.numberOfHarmonics = options.numberOfHarmonics;
this.maxAmplitude = options.maxAmplitude;
this.getNumberOfNonZeroHarmonics = options.getNumberOfNonZeroHarmonics;
this.numberOfHarmonics = options.numberOfHarmonics; // {number}
this.maxAmplitude = options.maxAmplitude; // {number}
this.getNumberOfNonZeroHarmonics = options.getNumberOfNonZeroHarmonics; // {function():number}
}

/**
Expand Down
8 changes: 4 additions & 4 deletions js/waveGame/model/WaveGameLevel.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ class WaveGameLevel extends PhetioObject {
super( config );

// @public (read-only)
this.levelNumber = levelNumber;
this.statusBarMessage = config.statusBarMessage;
this.infoDialogDescription = config.infoDialogDescription;
this.levelNumber = levelNumber; // {number}
this.statusBarMessage = config.statusBarMessage; // {string}
this.infoDialogDescription = config.infoDialogDescription; // {string}

// @private
this.defaultNumberOfAmplitudeControls = config.defaultNumberOfAmplitudeControls;
this.defaultNumberOfAmplitudeControls = config.defaultNumberOfAmplitudeControls; // {number}

// @public The score is the total number of points that have been awarded for this level.
this.scoreProperty = new NumberProperty( 0, {
Expand Down
4 changes: 3 additions & 1 deletion js/waveGame/model/WaveGameSumChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ class WaveGameSumChart extends SumChart {
// @public (read-only)
this.guessSeries = guessSeries;

// {Property.<Vector2[]>}
const createGuessDataSet = () => guessSeries.createSumDataSet( xAxisDescription, domain, seriesType, t );

// @public Data set that displays the waveform for the user's guess. Points are ordered by increasing x value.
// @public {Property.<Vector2[]>}
// Data set that displays the waveform for the user's guess. Points are ordered by increasing x value.
this.guessDataSetProperty = new Property( createGuessDataSet(), {
isValidValue: array => Array.isArray( array ) && _.every( array, element => element instanceof Vector2 )
} );
Expand Down
2 changes: 1 addition & 1 deletion js/waveGame/view/PointsAwardedNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class PointsAwardedNode extends HBox {
super( options );

// @private
this.pointsNode = pointsNode;
this.pointsNode = pointsNode; // {Text}
}

/**
Expand Down
12 changes: 6 additions & 6 deletions js/waveGame/view/WaveGameLevelNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,15 +476,15 @@ class WaveGameLevelNode extends Node {
//------------------------------------------------------------------------------------------------------------------

// @public
this.level = level;
this.level = level; // {WaveGameLevel}

// @private
this.layoutBounds = layoutBounds;
this.gameAudioPlayer = gameAudioPlayer;
this.harmonicsChartRectangleLocalBounds = harmonicsChartRectangleLocalBounds;
this.pointsAwardedNode = pointsAwardedNode;
this.layoutBounds = layoutBounds; // {Bounds2}
this.gameAudioPlayer = gameAudioPlayer; // {GameAudioPlayer}
this.harmonicsChartRectangleLocalBounds = harmonicsChartRectangleLocalBounds; // {Bounds2}
this.pointsAwardedNode = pointsAwardedNode; // {PointsAwardedNode}
this.pointsAwardedAnimation = null; // {Animation|null}
this.frownyFaceNode = frownyFaceNode;
this.frownyFaceNode = frownyFaceNode; // {FaceNode}
this.frownyFaceAnimation = null; // {Animation|null}
}

Expand Down
2 changes: 1 addition & 1 deletion js/waveGame/view/WaveGameLevelSelectionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class WaveGameLevelSelectionButton extends LevelSelectionButton {
super( icon, level.scoreProperty, options );

// @public
this.level = level;
this.level = level; // {WaveGameLevel}
}
}

Expand Down

0 comments on commit f69c46d

Please sign in to comment.