()
| 3955 | } |
| 3956 | |
| 3957 | function createElementTypeChecker() { |
| 3958 | function validate(props, propName, componentName, location, propFullName) { |
| 3959 | var propValue = props[propName]; |
| 3960 | if (!ReactElement.isValidElement(propValue)) { |
| 3961 | var locationName = ReactPropTypeLocationNames[location]; |
| 3962 | var propType = getPropType(propValue); |
| 3963 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); |
| 3964 | } |
| 3965 | return null; |
| 3966 | } |
| 3967 | return createChainableTypeChecker(validate); |
| 3968 | } |
| 3969 | |
| 3970 | function createInstanceTypeChecker(expectedClass) { |
| 3971 | function validate(props, propName, componentName, location, propFullName) { |
no test coverage detected