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

Function createNodeChecker

examples/simple/react.js:12657–12666  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12655}
12656
12657function createNodeChecker() {
12658 function validate(props, propName, componentName, location, propFullName) {
12659 if (!isNode(props[propName])) {
12660 var locationName = ReactPropTypeLocationNames[location];
12661 return new Error('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
12662 }
12663 return null;
12664 }
12665 return createChainableTypeChecker(validate);
12666}
12667
12668function createShapeTypeChecker(shapeTypes) {
12669 function validate(props, propName, componentName, location, propFullName) {

Callers 1

react.jsFile · 0.85

Calls 1

Tested by

no test coverage detected