import _ from 'lodash';
import '../../../globals.js';
import tandemNamespace from '../tandemNamespace.js';
import IOType from './IOType.js';
import StateSchema from './StateSchema.js';
import ValueIO from './ValueIO.js';
const noExtraPrototype = (object) => Object.getPrototypeOf(object) === Object.prototype;
/**
 * IOType intended for usage with object literals, primarily for toStateObject/fromStateObject.
 * @author Sam Reid (PhET Interactive Simulations)
 */
const ObjectLiteralIO = new IOType('ObjectLiteralIO', {
    documentation: 'PhET-iO Type for object literals',
    isValidValue: noExtraPrototype,
    supertype: ValueIO,
    stateSchema: StateSchema.asValue('object', { valueType: Object, isValidValue: noExtraPrototype }),
    toStateObject: _.identity
});
tandemNamespace.register('ObjectLiteralIO', ObjectLiteralIO);
export default ObjectLiteralIO;
//# sourceMappingURL=ObjectLiteralIO.js.map