From d7c69eef5ae80d870af0d484ec388093c5b56cff Mon Sep 17 00:00:00 2001 From: zepumph Date: Fri, 17 Jul 2020 14:11:02 -0800 Subject: [PATCH] Add EnabledNode PhET-iO API and support for LinkedElementIO in API validation, mixin EnabledComponentAPIMixin into SliderAPI, https://github.com/phetsims/sun/issues/605 --- js/PropertyAPI.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/js/PropertyAPI.js b/js/PropertyAPI.js index ce1a87f7..1feb25ee 100644 --- a/js/PropertyAPI.js +++ b/js/PropertyAPI.js @@ -6,16 +6,23 @@ * @author Michael Kauzmann (PhET Interactive Simulations) */ -import PhetioObjectAPI from '../../../tandem/js/PhetioObjectAPI.js'; +import PhetioObjectAPI from '../../tandem/js/PhetioObjectAPI.js'; +import merge from '../../phet-core/js/merge.js'; +import required from '../../phet-core/js/required.js'; import axon from './axon.js'; class PropertyAPI extends PhetioObjectAPI { /** - * @param {Object} [options] + * @param {Object} config */ - constructor( options ) { - super( options ); + constructor( config ) { + + config = merge( { + phetioType: required( config.phetioType ) + }, config ); + + super( config ); } }