File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
test/react-js-make-props-and-state-transform/static-proptypes-many-props Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,11 @@ export function reactJSMakePropsAndStateInterfaceTransformFactoryFactory(typeChe
228
228
return result ;
229
229
}
230
230
231
+ // Ignore children, React types have it
232
+ if ( propertyAssignment . name . getText ( ) === 'children' ) {
233
+ return result ;
234
+ }
235
+
231
236
const typeValue = getTypeFromReactPropTypeExpression ( propertyAssignment . initializer ) ;
232
237
const isOptional = isPropTypeOptional ( propertyAssignment . initializer ) ;
233
238
const propertySignature = ts . createPropertySignature (
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as React from 'react';
2
2
3
3
export default class MyComponent extends React . Component {
4
4
static propTypes = {
5
+ children : React . PropTypes . node ,
5
6
any : React . PropTypes . any ,
6
7
array : React . PropTypes . array ,
7
8
bool : React . PropTypes . bool ,
@@ -24,4 +25,4 @@ export default class MyComponent extends React.Component {
24
25
render ( ) {
25
26
return < div /> ;
26
27
}
27
- }
28
+ }
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ export default class MyComponent extends React.Component<{
21
21
elementRequired : JSX . Element ;
22
22
} , { } > {
23
23
static propTypes = {
24
+ children : React . PropTypes . node ,
24
25
any : React . PropTypes . any ,
25
26
array : React . PropTypes . array ,
26
27
bool : React . PropTypes . bool ,
You can’t perform that action at this time.
0 commit comments