From cca8e36ef05a9ff0584bae8c68182888929ab67c Mon Sep 17 00:00:00 2001 From: samreid Date: Thu, 1 Nov 2018 22:52:26 -0600 Subject: [PATCH] hard-code phetioType in NumberProperty, see https://github.com/phetsims/axon/issues/116 --- js/NumberProperty.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/NumberProperty.js b/js/NumberProperty.js index b5942159..3510fdb7 100644 --- a/js/NumberProperty.js +++ b/js/NumberProperty.js @@ -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;