From e11512c5351027048b8d73773ea33d432eb58c25 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 70800299..8f0f3eba 100644 --- a/js/ReadOnlyProperty.ts +++ b/js/ReadOnlyProperty.ts @@ -128,7 +128,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. @@ -143,6 +142,7 @@ export default class ReadOnlyProperty extends PhetioObject implements TReadOn reentrantNotificationStrategy: 'queue', // phet-io + tandemNameSuffix: [ 'Property', DYNAMIC_ARCHETYPE_NAME ], // DYNAMIC_ARCHETYPE_NAME means that this Property is an archetype. phetioOuterType: ReadOnlyProperty.PropertyIO, phetioValueType: IOType.ObjectIO }, providedOptions ); @@ -188,12 +188,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, options.reentrantNotificationStrategy );