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.

function validate(props, propName, componentName, location, propFullName) {
    if (typeof typeChecker !== 'function') {
      return new PropTypeError(
        `Property \`${propFullName}\` of component \`${componentName}\` has invalid PropType notation inside objectOf.`
      );
    }
    var propValue = props[propName];
    var propType = getPropType(propValue);
    if (propType !== 'object') {
      var locationName = ReactPropTypeLocationNames[location];
      return new PropTypeError(
        `Invalid ${locationName} \`${propFullName}\` of type ` +
        `\`${propType}\` supplied to \`${componentName}\`, expected an object.`
      );
    }
    for (var key in propValue) {
      if (propValue.hasOwnProperty(key)) {
        var error = typeChecker(
          propValue,
          key,
          componentName,
          location,
          `${propFullName}.${key}`
        );
        if (error instanceof Error) {
          return error;