Skip to content

Commit

Permalink
hard-code phetioType in NumberProperty, see #116
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Nov 2, 2018
1 parent bdc63e6 commit cca8e36
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/NumberProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ define( function( require ) {
numberType: 'FloatingPoint', // {string} see VALID_VALUE_TYPES

// {Range|null} range
range: null,
phetioType: NumberPropertyIO
range: null
}, options );

assert && assert( _.includes( VALID_NUMBER_TYPES, options.numberType ), 'invalid numberType: ' + options.numberType );
options.range && assert && assert( options.range instanceof Range, 'options.range must be of type Range:' + options.range );

assert && assert( !options.hasOwnProperty( 'phetioType' ), 'phetioType is set by NumberProperty' );
options.phetioType = NumberPropertyIO;

// @public (read-only) - used by PhET-iO in NumberPropertyIO as metadata passed to the wrapper.
this.numberType = options.numberType;
this.range = options.range;
Expand Down

0 comments on commit cca8e36

Please sign in to comment.