Skip to content

Commit

Permalink
tandemNameSuffix, phetsims/tandem#310
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom authored and zepumph committed Mar 18, 2024
1 parent d2e7f13 commit e11512c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions js/ReadOnlyProperty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ export default class ReadOnlyProperty<T> extends PhetioObject implements TReadOn
protected hasDeferredValue: boolean;

protected readonly valueValidator: Validator<T>;
public static readonly TANDEM_NAME_SUFFIX: string = 'Property';

/**
* This is protected to indicate to clients that subclasses should be used instead.
Expand All @@ -143,6 +142,7 @@ export default class ReadOnlyProperty<T> 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 );
Expand Down Expand Up @@ -188,12 +188,6 @@ export default class ReadOnlyProperty<T> 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 );
Expand Down

0 comments on commit e11512c

Please sign in to comment.