code: function(propTypes, props, location) {
      // TODO: Stop validating prop types here and only use the element
      // validation.
      var componentName = this.getName();
      for (var propName in propTypes) {
        if (propTypes.hasOwnProperty(propName)) {
          var error;
          try {
            // This is intentionally an invariant that gets caught. It's the same
            // behavior as without this statement except with a better message.
            ("production" !== "development" ? invariant(
              typeof propTypes[propName] === 'function',
              '%s: %s type `%s` is invalid; it must be a function, usually ' +
              'from React.PropTypes.',
              componentName || 'React class',
              ReactPropTypeLocationNames[location],
              propName
            ) : invariant(typeof propTypes[propName] === 'function'));
            error = propTypes[propName](props, propName, componentName, location);
          } catch (ex) {
            error = ex;
          }
          if (error instanceof Error) {
            // We may want to extend this logic for similar errors in
            // React.render calls, so I'm abstracting it away into
            // a function to minimize refactoring in the future
            var addendum = getDeclarationErrorAddendum(this);
  
            if (location === ReactPropTypeLocations.prop) {
              // Preface gives us something to blacklist in warning module
              ("production" !== "development" ? warning(
                false,
                'Failed Composite propType: %s%s',
                error.message,
                addendum
              ) : null);
            } else {
              ("production" !== "development" ? warning(
                false,
                'Failed Context Types: %s%s',
                error.message,
                addendum
              ) : null);
            }
          }
        }
      }
    }
docs: Assert that the props are valid
  
  @param {object} propTypes Map of prop name to a ReactPropType
  @param {object} props
  @param {string} location e.g. "prop", "context", "child context"
  @private