code: function isRequiredWrapper(propType) {
    const isRequired = (props, propName, componentName, ...rest) => {
      if (!props[propName]) {
        return new Error(
          `the property "${propName}" is marked as required for the component ` +
          `"${componentName}" but "${props[propName]}" has been provided`
        );
      }
      return propType(props, propName, componentName, ...rest);
    };
    isRequired[SHAPE] = propType[SHAPE];
    return isRequired;
  }
docs: Return the isRequired wrapper for the given propType validator.
  
  @param {Function} propType A shape or frozen validator.
  @return {Function} The isRequired validator.