()
| 457 | } |
| 458 | |
| 459 | function createElementTypeTypeChecker() { |
| 460 | function validate(props, propName, componentName, location, propFullName) { |
| 461 | var propValue = props[propName]; |
| 462 | if (!ReactIs.isValidElementType(propValue)) { |
| 463 | var propType = getPropType(propValue); |
| 464 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); |
| 465 | } |
| 466 | return null; |
| 467 | } |
| 468 | return createChainableTypeChecker(validate); |
| 469 | } |
| 470 | |
| 471 | function createInstanceTypeChecker(expectedClass) { |
| 472 | function validate(props, propName, componentName, location, propFullName) { |
no test coverage detected
searching dependent graphs…