Skip to content

Commit

Permalink
Move documentation to options and default to '', see #188
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Aug 25, 2020
1 parent fbd3b1c commit 066240c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/PhetioObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down Expand Up @@ -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 ) {
Expand Down

0 comments on commit 066240c

Please sign in to comment.