import '../../assert/js/assert.js';
import '../../globals.js';
// Copyright 2016-2022, University of Colorado Boulder
/**
 * StringProperty is a Property whose value is a string.
 *
 * @author Sam Reid (PhET Interactive Simulations)
 * @author Chris Malley (PixelZoom, Inc.)
 */
import optionize from '../../phet-core/js/optionize.js';
import StringIO from '../../tandem/js/types/StringIO.js';
import axon from './axon.js';
import Property from './Property.js';
export default class StringProperty extends Property {
    constructor(value, providedOptions) {
        // client cannot specify superclass options that are controlled by StringProperty
        if (providedOptions) {
            assert && assert(!providedOptions.hasOwnProperty('valueType'), 'StringProperty sets valueType');
            assert && assert(!providedOptions.hasOwnProperty('phetioType'), 'StringProperty sets phetioType');
        }
        // Fill in superclass options that are controlled by StringProperty.
        const options = optionize()({
            valueType: 'string',
            phetioValueType: StringIO
        }, providedOptions);
        super(value, options);
    }
}
axon.register('StringProperty', StringProperty);
//# sourceMappingURL=StringProperty.js.map