Skip to content

Commit

Permalink
delete redundant JSdoc type expressions, #80
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Mar 3, 2023
1 parent 69196a4 commit 877f6b0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions js/common/view/QuantitiesNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type SelfOptions = {
boxWidth?: number; // width of the Before and After boxes
afterBoxXOffset?: number; // x-offset of left of After box, relative to left of Before box
quantityRange?: Range; // range of spinners
hideNumbersBox?: boolean; // {boolean} should we include a 'hide box' to cover the static numbers?
hideNumbersBox?: boolean; // should we include a 'hide box' to cover the static numbers?
minIconSize?: Dimension2; // minimum amount of layout space reserved for Substance icons
showSymbols?: boolean; // whether to show symbols (eg, H2O) for the substances in the reactions
};
Expand Down Expand Up @@ -86,13 +86,13 @@ export default class QuantitiesNode extends Node {
const options = optionize<QuantitiesNodeOptions, SelfOptions, NodeOptions>()( {

// SelfOptions
interactiveBox: BoxType.BEFORE, // {BoxType} interactiveBox which box is interactive
boxWidth: 100, // {number} width of the Before and After boxes
afterBoxXOffset: 200, // {number} x-offset of left of After box, relative to left of Before box
quantityRange: RPALConstants.QUANTITY_RANGE, // {Range} range of spinners
hideNumbersBox: false, // {boolean} should we include a 'hide box' to cover the static numbers?
interactiveBox: BoxType.BEFORE, // interactiveBox which box is interactive
boxWidth: 100, // width of the Before and After boxes
afterBoxXOffset: 200, // x-offset of left of After box, relative to left of Before box
quantityRange: RPALConstants.QUANTITY_RANGE, // range of spinners
hideNumbersBox: false, // should we include a 'hide box' to cover the static numbers?
minIconSize: new Dimension2( 0, 0 ), // minimum amount of layout space reserved for Substance icons
showSymbols: true // {boolean} whether to show symbols (eg, H2O) for the substances in the reactions
showSymbols: true // whether to show symbols (eg, H2O) for the substances in the reactions
}, providedOptions );

// explicitly hoist reused vars
Expand Down
4 changes: 2 additions & 2 deletions js/common/view/RPALScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export default class RPALScreenView<R extends Reaction = Reaction> extends Scree
} );

// Properties that are specific to the view
const beforeExpandedProperty = new BooleanProperty( true ); // {boolean} is the Before box expanded?
const afterExpandedProperty = new BooleanProperty( true ); // {boolean} is the After box expanded
const beforeExpandedProperty = new BooleanProperty( true ); // is the Before box expanded?
const afterExpandedProperty = new BooleanProperty( true ); // is the After box expanded

// Equation and reaction radio buttons at top of screen
const reactionBarNode = new ReactionBarNode( model.reactionProperty, model.reactions, createEquationNode, {
Expand Down
2 changes: 1 addition & 1 deletion js/game/model/ChallengeFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function createChallenges( level: number, maxQuantity: number, challengeOptions?
for ( let i = 0; i < numberOfChallenges; i++ ) {

// reaction with quantities
let reaction = null; // {Reaction}
let reaction: Reaction;
if ( i === zeroProductsIndex ) {
reaction = createChallengeWithoutProducts( factoryFunctions );
}
Expand Down
4 changes: 2 additions & 2 deletions js/game/model/GameModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default class GameModel implements TModel {
public readonly numberOfLevels: number;
public readonly maxQuantity: number;

public readonly timerEnabledProperty: Property<boolean>;
public readonly timerEnabledProperty: Property<boolean>; // is the timer turned on?
public readonly gameVisibilityProperty: EnumerationProperty<GameVisibility>;

// the current level, starts at 0 in the model, presented as starting from 1 in the view
Expand Down Expand Up @@ -84,7 +84,7 @@ export default class GameModel implements TModel {
this.numberOfLevels = options.numberOfLevels;
this.maxQuantity = options.maxQuantity;

this.timerEnabledProperty = new BooleanProperty( false ); // {boolean} is the timer turned on?
this.timerEnabledProperty = new BooleanProperty( false );
this.gameVisibilityProperty = new EnumerationProperty( GameVisibility.SHOW_ALL );

// read-only
Expand Down

0 comments on commit 877f6b0

Please sign in to comment.