phetsims / tandem

Simulation-side code for PhET-iO
MIT License
0 stars 5 forks source link

Change PhetioCapsule phetioType to phetioValueType #276

Open pixelzoom opened 1 year ago

pixelzoom commented 1 year ago

Should PhetioCapsule API be changed from phetioType to phetioValueType, as was done for DerivedProperty?

Example in PhetMenu.ts:

    const aboutDialogCapsule = new PhetioCapsule( ..., {
      ...
      phetioType: PhetioCapsule.PhetioCapsuleIO( Dialog.DialogIO )
    } );

The PhetioCapsule.PhetioCapsuleIO bit is required in all cases. So why not change to:

-      phetioType: PhetioCapsule.PhetioCapsuleIO( Dialog.DialogIO )
+      phetioValueType: Dialog.DialogIO
samreid commented 1 year ago

Adding to https://github.com/phetsims/phet-io/issues/1914 and self-unassigning.