MCPcopy Create free account
hub / github.com/RubyLouvre/anu / validateTypeDef

Function validateTypeDef

test/react.js:808–816  ·  view source on GitHub ↗
(Constructor, typeDef, location)

Source from the content-addressed store, hash-verified

806 autobind: function () {} };
807
808function validateTypeDef(Constructor, typeDef, location) {
809 for (var propName in typeDef) {
810 if (typeDef.hasOwnProperty(propName)) {
811 // use a warning instead of an invariant so components
812 // don't show up in prod but only in __DEV__
813 "development" !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0;
814 }
815 }
816}
817
818function validateMethodOverride(isAlreadyDefined, name) {
819 var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;

Callers 1

react.jsFile · 0.85

Calls 1

warningFunction · 0.70

Tested by

no test coverage detected