function buildTypeAnnotationDeclarationTypes(annotation){switch(annotation.type){case'GenericTypeAnnotation':if(typeScope(annotation.id.name)){return buildTypeAnnotationDeclarationTypes(typeScope(annotation.id.name));}return true;case'ObjectTypeAnnotation':var shapeTypeDefinition={type:'shape',children:{}};iterateProperties(annotation.properties,function(childKey,childValue){shapeTypeDefinition.children[childKey]=buildTypeAnnotationDeclarationTypes(childValue);});return shapeTypeDefinition;case'UnionTypeAnnotation':var unionTypeDefinition={type:'union',children:[]};for(var i=0,j=annotation.types.length;i<j;i++){var type=buildTypeAnnotationDeclarationTypes(annotation.types[i]);// keep only complex type
if(type!==true){if(type.children===true){// every child is accepted for one type, abort type analysis
unionTypeDefinition.children=true;return unionTypeDefinition;}}unionTypeDefinition.children.push(type);}if(unionTypeDefinition.children.length===0){// no complex type found, simply accept everything
return true;}return unionTypeDefinition;case'ArrayTypeAnnotation':return{type:'object',children:{__ANY_KEY__:buildTypeAnnotationDeclarationTypes(annotation.elementType)}};default:// Unknown or accepts everything.
return true;}}
Creates the representation of the React props type annotation for the component.
The representation is used to verify nested used properties.
@param {ASTNode} annotation Type annotation for the props class property.
@return {Object|Boolean} The representation of the declaration, true means
   the property is declared without the need for further analysis.