From 066240c492c596279730783fb7514617ab0c53ab Mon Sep 17 00:00:00 2001 From: samreid Date: Tue, 25 Aug 2020 17:23:27 -0600 Subject: [PATCH] Move documentation to options and default to '', see https://github.com/phetsims/tandem/issues/188 --- js/PhetioObject.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/PhetioObject.js b/js/PhetioObject.js index 2948aea1..25206946 100644 --- a/js/PhetioObject.js +++ b/js/PhetioObject.js @@ -688,13 +688,13 @@ class LinkedElement extends PhetioObject { * Function that creates an IO type associated with a core type. Methods are forwarded to the core type. * @param {function} CoreType, e.g., Bunny * @param {string} typeName, e.g., BunnyIO - * @param {string} documentation, e.g., "Animal that has a genotype (genetic blueprint) and a phenotype (appearance)." * @param {Object} [options] * @returns {IOType} */ -PhetioObject.createIOType = ( CoreType, typeName, documentation, options ) => { +PhetioObject.createIOType = ( CoreType, typeName, options ) => { options = merge( { + documentation: '', // {string} e.g., "Animal that has a genotype (genetic blueprint) and a phenotype (appearance)." methods: null // {null|Object} - key/value pairs with methods, see PhetioEngineIO for an example }, options ); @@ -739,7 +739,7 @@ PhetioObject.createIOType = ( CoreType, typeName, documentation, options ) => { } } - IOType.documentation = documentation; + IOType.documentation = options.documentation; IOType.validator = { valueType: CoreType }; IOType.typeName = typeName; if ( options.methods ) {