File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,19 @@ Object {
71
71
" value" : " Child.propTypes" ,
72
72
},
73
73
},
74
+ " extendedChild" : Object {
75
+ " description" : " " ,
76
+ " required" : true ,
77
+ " type" : Object {
78
+ " name" : " shape" ,
79
+ " value" : Object {
80
+ " adopted" : Object {
81
+ " name" : " bool" ,
82
+ " required" : true ,
83
+ },
84
+ },
85
+ },
86
+ },
74
87
" something" : Object {
75
88
" description" : " " ,
76
89
" required" : true ,
Original file line number Diff line number Diff line change @@ -19,8 +19,12 @@ var pt = React.PropTypes;
19
19
class Parent extends React . Component {
20
20
static propTypes = {
21
21
something : pt . string . isRequired ,
22
- child : pt . shape ( Child . propTypes ) . isRequired
23
- }
22
+ child : pt . shape ( Child . propTypes ) . isRequired ,
23
+ extendedChild : pt . shape ( {
24
+ ...Child . propTypes ,
25
+ adopted : pt . bool . isRequired
26
+ } ) . isRequired
27
+ } ;
24
28
}
25
29
26
30
export default Parent ;
Original file line number Diff line number Diff line change @@ -112,6 +112,11 @@ function getPropTypeShape(argumentPath) {
112
112
if ( types . ObjectExpression . check ( argumentPath . node ) ) {
113
113
var value = { } ;
114
114
argumentPath . get ( 'properties' ) . each ( function ( propertyPath ) {
115
+ if ( propertyPath . get ( 'type' ) . value === types . SpreadProperty . name ) {
116
+ // It is impossible to resolve a name for a spreadproperty
117
+ return ;
118
+ }
119
+
115
120
var descriptor : PropDescriptor | PropTypeDescriptor =
116
121
getPropType ( propertyPath . get ( 'value' ) ) ;
117
122
var docs = getDocblock ( propertyPath ) ;
You can’t perform that action at this time.
0 commit comments