function _isDeclaredInComponent(declaredPropTypes,keyList){for(var i=0,j=keyList.length;i<j;i++){var key=keyList[i];var propType=declaredPropTypes&&(// Check if this key is declared
declaredPropTypes[key]||// If not, check if this type accepts any key
declaredPropTypes.__ANY_KEY__);if(!propType){// If it's a computed property, we can't make any further analysis, but is valid
return key==='__COMPUTED_PROP__';}if(propType===true){return true;}// Consider every children as declared
if(propType.children===true){return true;}if(propType.acceptedProperties){return key in propType.acceptedProperties;}if(propType.type==='union'){// If we fall in this case, we know there is at least one complex type in the union
if(i+1>=j){// this is the last key, accept everything
return true;}// non trivial, check all of them
var unionTypes=propType.children;var unionPropType={};for(var k=0,z=unionTypes.length;k<z;k++){unionPropType[key]=unionTypes[k];var isValid=_isDeclaredInComponent(unionPropType,keyList.slice(i));if(isValid){return true;}}// every possible union were invalid
return false;}declaredPropTypes=propType.children;}return true;}
Internal: Checks if the prop is declared
@param {Object} declaredPropTypes Description of propTypes declared in the current component
@param {String[]} keyList Dot separated name of the prop to check.
@returns {Boolean} True if the prop is declared, false if not.