After a discussion with @spicyj we decided to keep the warning even though the functions will throw in production. The warning is the only way to learn about that.

We should also document how to pass the secret through in case you know what you're doing.

});
  describe('ObjectOf Type', () => {
    it('should fail for invalid argument', () => {
      typeCheckFail(
        PropTypes.objectOf({ foo: PropTypes.string }),
        { foo: 'bar' },
        'Property `testProp` of component `testComponent` has invalid PropType notation inside objectOf.'
      );
    });
    it('should support the objectOf propTypes', () => {
      typeCheckPass(PropTypes.objectOf(PropTypes.number), {a: 1, b: 2, c: 3});
      typeCheckPass(
        PropTypes.objectOf(PropTypes.string),
        {a: 'a', b: 'b', c: 'c'}
      );
      typeCheckPass(
        PropTypes.objectOf(PropTypes.oneOf(['a', 'b'])),
        {a: 'a', b: 'b'}
      );
      typeCheckPass(
        PropTypes.objectOf(PropTypes.symbol),
        {a: Symbol(), b: Symbol(), c: Symbol()}
      );
    });
    it('should support objectOf with complex types', () => {
      typeCheckPass(
        PropTypes.objectOf(PropTypes.shape({a: PropTypes.number.isRequired})),
        {a: {a: 1}, b: {a: 2}}
      );
      function Thing() {}