MCPcopy Create free account
hub / github.com/Lobos/react-ui / validateTypeDef

Function validateTypeDef

docs/lib/react.js:4773–4781  ·  view source on GitHub ↗
(Constructor, typeDef, location)

Source from the content-addressed store, hash-verified

4771
4772// noop
4773function validateTypeDef(Constructor, typeDef, location) {
4774 for (var propName in typeDef) {
4775 if (typeDef.hasOwnProperty(propName)) {
4776 // use a warning instead of an invariant so components
4777 // don't show up in prod but only in __DEV__
4778 "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;
4779 }
4780 }
4781}
4782
4783function validateMethodOverride(isAlreadyDefined, name) {
4784 var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;

Callers 1

react.jsFile · 0.85

Calls 1

warningFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…