This repository was archived by the owner on Sep 21, 2019. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 11 files changed +99
-70
lines changed 
collapse-intersection-interfaces-transform/multiple 
end-to-end/multiple-components 
react-js-make-props-and-state-transform/multiple-components 
react-move-prop-types-to-class-transform/multiple-components 
react-remove-prop-types-assignment-transform/multiple 
react-remove-prop-types-import 
from-react-multi-named-import 
react-remove-static-prop-types-member-transform/multiple-components 
react-stateless-function-make-props-transform/multiple-components Expand file tree Collapse file tree 11 files changed +99
-70
lines changed Original file line number Diff line number Diff line change 11type  Foo  =  { 
2-      foo : string ; 
3-      bar : number ; 
2+ foo : string , 
3+ bar : number 
44} ; 
55type  Bar  =  { 
6-      foo : number ; 
7-      bar : string ; 
6+ foo : number , 
7+ bar : string 
88} ; 
Original file line number Diff line number Diff line change 11type  HelloProps  =  { 
2-     message ?: string ; 
2+     message ?: string 
33} ; 
44const  Hello : React . SFC < HelloProps >  =  ( {  message } )  =>  { 
55    return  < div > hello { message } </ div > ; 
66} ; 
77type  HeyProps  =  { 
8-     message ?: string ; 
8+     message ?: string 
99} ; 
1010const  Hey : React . SFC < HeyProps >  =  ( {  name } )  =>  { 
1111    return  < div > hey, { name } </ div > ; 
1212} ; 
1313type  MyComponentState  =  { 
14-     foo : number ; 
15-     bar : number ; 
14+     foo : number , 
15+     bar : number 
1616} ; 
17- export  default  class  MyComponent  extends  React . Component < { 
18-     } ,  MyComponentState >  { 
17+ export  default  class  MyComponent  extends  React . Component < { } ,  MyComponentState >  { 
1918    render ( )  { 
20-         return  < button  onClick = { this . onclick . bind ( this ) } /> ; 
19+         return  < button  onClick = { this . onclick . bind ( this ) }   /> ; 
2120    } 
2221    onclick ( )  { 
2322        this . setState ( {  foo : 1 ,  bar : 2  } ) ; 
2423    } 
2524} 
2625type  AnotherComponentProps  =  { 
27-     foo : string ; 
26+     foo : string 
2827} ; 
29- export  class  AnotherComponent  extends  React . Component < AnotherComponentProps ,  { 
30-     } >  { 
28+ export  class  AnotherComponent  extends  React . Component < 
29+     AnotherComponentProps , 
30+     { } 
31+ >  { 
3132    render ( )  { 
3233        return  < div  /> ; 
3334    } 
Original file line number Diff line number Diff line change 11import  *  as  React  from  'react' ; 
2- type  MyComponentState  =  {  foo : number ;  bar : number ;  } ; 
3- export  default  class  MyComponent  extends  React . Component < { 
4-     } ,  MyComponentState >  { 
2+ type  MyComponentState  =  {  foo : number ,  bar : number  } ; 
3+ export  default  class  MyComponent  extends  React . Component < { } ,  MyComponentState >  { 
54    render ( )  { 
6-         return  < button  onClick = { this . onclick . bind ( this ) } /> ; 
5+         return  < button  onClick = { this . onclick . bind ( this ) }   /> ; 
76    } 
87    onclick ( )  { 
98        this . setState ( {  foo : 1 ,  bar : 2  } ) ; 
109    } 
1110} 
1211type  AnotherComponentProps  =  { 
13-     foo : string ; 
12+     foo : string 
1413} ; 
15- export  class  AnotherComponent  extends  React . Component < AnotherComponentProps ,  { 
16-     } >  { 
14+ export  class  AnotherComponent  extends  React . Component < 
15+     AnotherComponentProps , 
16+     { } 
17+ >  { 
1718    static  propTypes  =  { 
18-         foo : React . PropTypes . string . isRequired , 
19+         foo : React . PropTypes . string . isRequired 
1920    } ; 
2021    render ( )  { 
2122        return  < div  /> ; 
Original file line number Diff line number Diff line change 1- class  SomeComponent  extends  React . Component < { 
2-         foo : number ; 
3-     } ,  { 
4-         bar : string ; 
5-     } >  { 
1+ class  SomeComponent  extends  React . Component < 
2+     { 
3+         foo : number 
4+     } , 
5+     { 
6+         bar : string 
7+     } 
8+ >  { 
69    static  propTypes  =  {  foo : React . PropTypes . string  } ; 
710    render ( )  { 
811        return  null ; 
912    } 
1013} 
1114SomeComponent . propTypes  =  {  foo : React . PropTypes . string  } ; 
1215class  AnotherComponent  extends  React . Component < { 
13-          baz : number ; 
14-      } >  { 
16+     baz : number 
17+ } >  { 
1518    static  propTypes  =  {  baz : React . PropTypes . string  } ; 
1619    render ( )  { 
1720        return  null ; 
Original file line number Diff line number Diff line change 1- class  SomeComponent  extends  React . Component < { 
2-         foo : string ; 
3-         baz : string ; 
4-     } ,  { 
5-         bar : string ; 
6-     } >  { 
7- } 
1+ class  SomeComponent  extends  React . Component < 
2+     { 
3+         foo : string , 
4+         baz : string 
5+     } , 
6+     { 
7+         bar : string 
8+     } 
9+ >  { } 
810class  AnotherComponent  extends  React . Component < { 
9-         lol : number ; 
10-     } >  { 
11- } 
11+     lol : number 
12+ } >  { } 
Original file line number Diff line number Diff line change 1- import  React  from  'react' ; 
2- 
1+ import  React  from  'react' 
32export  const  Hello  =  ( {  message } )  =>  { 
4-      return  < div > hello { message } </ div > ; 
5- } ; 
3+   return  < div > hello { message } </ div > 
4+ } 
Original file line number Diff line number Diff line change 11import  React ,  {  Component  }  from  'react' ; 
2- 
32export  class  MyComponent  extends  Component  { 
4-      render ( )  { 
5-          return  < div > hello</ div > ; 
6-      } 
3+   render ( )  { 
4+     return  < div > hello</ div > ; 
5+   } 
76} 
Original file line number Diff line number Diff line change 1- import  React  from  'react' ; 
2- 
1+ import  React  from  'react' 
32export  const  Hello  =  ( {  message } )  =>  { 
4-      return  < div > hello { message } </ div > ; 
5- } ; 
3+   return  < div > hello { message } </ div > 
4+ } 
Original file line number Diff line number Diff line change 1- class  SomeComponent  extends  React . Component < { 
2-         foo : number ; 
3-     } ,  { 
4-         bar : string ; 
5-     } >  { 
6- } 
7- class  AnotherComponent  extends  React . Component < { 
8-         foo : number ; 
9-     } ,  { 
10-         bar : string ; 
11-     } >  { 
12- } 
1+ class  SomeComponent  extends  React . Component < 
2+     { 
3+         foo : number 
4+     } , 
5+     { 
6+         bar : string 
7+     } 
8+ >  { } 
9+ class  AnotherComponent  extends  React . Component < 
10+     { 
11+         foo : number 
12+     } , 
13+     { 
14+         bar : string 
15+     } 
16+ >  { } 
Original file line number Diff line number Diff line change 11type  HelloProps  =  { 
2-      message ?: string ; 
2+   message ?: string 
33} ; 
44const  Hello : React . SFC < HelloProps >  =  ( {  message } )  =>  { 
5-      return  < div > hello { message } </ div > ; 
5+   return  < div > hello { message } </ div > ; 
66} ; 
77type  HeyProps  =  { 
8-      name : string ; 
8+   name : string 
99} ; 
1010const  Hey : React . SFC < HeyProps >  =  ( {  name } )  =>  { 
11-      return  < div > hey, { name } </ div > ; 
11+   return  < div > hey, { name } </ div > ; 
1212} ; 
1313Hey . propTypes  =  { 
14-      name : React . PropTypes . string . isRequired , 
14+   name : React . PropTypes . string . isRequired 
1515} ; 
1616Hello . propTypes  =  { 
17-      message : React . PropTypes . string , 
17+   message : React . PropTypes . string 
1818} ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments