MCPcopy Create free account
hub / github.com/Lucifier129/react-lite / validateTypeDef

Function validateTypeDef

examples/simple/react.js:4720–4728  ·  view source on GitHub ↗
(Constructor, typeDef, location)

Source from the content-addressed store, hash-verified

4718
4719// noop
4720function validateTypeDef(Constructor, typeDef, location) {
4721 for (var propName in typeDef) {
4722 if (typeDef.hasOwnProperty(propName)) {
4723 // use a warning instead of an invariant so components
4724 // don't show up in prod but not in __DEV__
4725 "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) : undefined;
4726 }
4727 }
4728}
4729
4730function validateMethodOverride(proto, name) {
4731 var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;

Callers 1

react.jsFile · 0.85

Calls 1

warningFunction · 0.50

Tested by

no test coverage detected