Skip to content

Commit

Permalink
add readonly to public static fields, phetsims/tandem#278
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Dec 1, 2022
1 parent 74f3b6e commit 0e6eadb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
26 changes: 13 additions & 13 deletions js/common/model/LabModes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ import Enumeration from '../../../../phet-core/js/Enumeration.js';
import EnumerationValue from '../../../../phet-core/js/EnumerationValue.js';

export default class LabModes extends EnumerationValue {
public static SUN_PLANET = new LabModes();
public static SUN_PLANET_MOON = new LabModes();
public static SUN_PLANET_COMET = new LabModes();
public static TROJAN_ASTEROIDS = new LabModes();
public static ELLIPSES = new LabModes();
public static HYPERBOLIC = new LabModes();
public static SLINGSHOT = new LabModes();
public static DOUBLE_SLINGSHOT = new LabModes();
public static BINARY_STAR_PLANET = new LabModes();
public static FOUR_STAR_BALLET = new LabModes();
public static DOUBLE_DOUBLE = new LabModes();
public static CUSTOM = new LabModes();
public static readonly SUN_PLANET = new LabModes();
public static readonly SUN_PLANET_MOON = new LabModes();
public static readonly SUN_PLANET_COMET = new LabModes();
public static readonly TROJAN_ASTEROIDS = new LabModes();
public static readonly ELLIPSES = new LabModes();
public static readonly HYPERBOLIC = new LabModes();
public static readonly SLINGSHOT = new LabModes();
public static readonly DOUBLE_SLINGSHOT = new LabModes();
public static readonly BINARY_STAR_PLANET = new LabModes();
public static readonly FOUR_STAR_BALLET = new LabModes();
public static readonly DOUBLE_DOUBLE = new LabModes();
public static readonly CUSTOM = new LabModes();

public static enumeration = new Enumeration( LabModes );
public static readonly enumeration = new Enumeration( LabModes );
}

mySolarSystem.register( 'LabModes', LabModes );
16 changes: 8 additions & 8 deletions js/common/view/ValuesColumnTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import Enumeration from '../../../../phet-core/js/Enumeration.js';
import EnumerationValue from '../../../../phet-core/js/EnumerationValue.js';

export default class ValuesColumnTypes extends EnumerationValue {
public static BODY_ICONS = new ValuesColumnTypes();
public static MASS = new ValuesColumnTypes();
public static MASS_SLIDER = new ValuesColumnTypes();
public static POSITION_X = new ValuesColumnTypes();
public static POSITION_Y = new ValuesColumnTypes();
public static VELOCITY_X = new ValuesColumnTypes();
public static VELOCITY_Y = new ValuesColumnTypes();
public static readonly BODY_ICONS = new ValuesColumnTypes();
public static readonly MASS = new ValuesColumnTypes();
public static readonly MASS_SLIDER = new ValuesColumnTypes();
public static readonly POSITION_X = new ValuesColumnTypes();
public static readonly POSITION_Y = new ValuesColumnTypes();
public static readonly VELOCITY_X = new ValuesColumnTypes();
public static readonly VELOCITY_Y = new ValuesColumnTypes();

public static enumeration = new Enumeration( ValuesColumnTypes );
public static readonly enumeration = new Enumeration( ValuesColumnTypes );
}

mySolarSystem.register( 'ValuesColumnTypes', ValuesColumnTypes );
12 changes: 6 additions & 6 deletions js/keplers-laws/model/LawMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import EnumerationValue from '../../../../phet-core/js/EnumerationValue.js';
import mySolarSystem from '../../mySolarSystem.js';

export default class LawMode extends EnumerationValue {
public static SECOND_LAW = new LawMode();
public static THIRD_LAW = new LawMode();
public static readonly SECOND_LAW = new LawMode();
public static readonly THIRD_LAW = new LawMode();

public static enumeration = new Enumeration( LawMode, {
phetioDocumentation: 'Whether the second or third law are selected'
} );
}
public static readonly enumeration = new Enumeration( LawMode, {
phetioDocumentation: 'Whether the second or third law are selected'
} );
}

mySolarSystem.register( 'LawMode', LawMode );

0 comments on commit 0e6eadb

Please sign in to comment.