From 95be8254ca3cc4a16005ce03d211f62b2e88c5fa Mon Sep 17 00:00:00 2001 From: pixelzoom Date: Wed, 28 Feb 2024 12:47:03 -0700 Subject: [PATCH] tandemNameSuffix, https://github.com/phetsims/tandem/issues/310 --- js/ReadOnlyProperty.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/js/ReadOnlyProperty.ts b/js/ReadOnlyProperty.ts index 52d80b87..007a8265 100644 --- a/js/ReadOnlyProperty.ts +++ b/js/ReadOnlyProperty.ts @@ -121,7 +121,6 @@ export default class ReadOnlyProperty extends PhetioObject implements TReadOn protected hasDeferredValue: boolean; protected readonly valueValidator: Validator; - public static readonly TANDEM_NAME_SUFFIX: string = 'Property'; /** * This is protected to indicate to clients that subclasses should be used instead. @@ -135,6 +134,7 @@ export default class ReadOnlyProperty extends PhetioObject implements TReadOn hasListenerOrderDependencies: false, // phet-io + tandemNameSuffix: [ 'Property', DYNAMIC_ARCHETYPE_NAME ], // DYNAMIC_ARCHETYPE_NAME means that this Property is an archetype. phetioOuterType: ReadOnlyProperty.PropertyIO, phetioValueType: IOType.ObjectIO }, providedOptions ); @@ -180,12 +180,6 @@ export default class ReadOnlyProperty extends PhetioObject implements TReadOn 'PhET-iO Properties must specify a phetioValueType: ' + this.phetioID ); } - assert && assert( !this.isPhetioInstrumented() || - options.tandem.name.endsWith( ReadOnlyProperty.TANDEM_NAME_SUFFIX ) || - options.tandem.name === 'property' || - options.tandem.name === DYNAMIC_ARCHETYPE_NAME, // It is ok to have dynamic element Properties (which would mean they are archetypes - `Property tandem.name must end with Property: ${options.tandem?.phetioID}` ); - this.validValues = options.validValues; this.tinyProperty = new TinyProperty( value, null, options.hasListenerOrderDependencies );