File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed 
flow-typed/@react-navigation Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -840,11 +840,15 @@ declare module '@react-navigation/stack' {
840840    >> , 
841841    + setOptions : ( options : $Shape < ScreenOptions > )  =>  void , 
842842    + setParams : ( 
843-       params : $If < 
844-         $IsUndefined < $ElementType < ParamList ,  RouteName >> , 
845-         empty , 
846-         $Shape < $NonMaybeType < $ElementType < ParamList ,  RouteName >>> , 
847-       > , 
843+       // We've edited this to be less complicated, so Flow in types-first 
844+       // mode can handle it. 
845+       // 
846+       // A slight downside of the edit is that the more complicated thing 
847+       // used to error when you tried to use `setParams` on a screen whose 
848+       // type says it has no params. Now we don't get those errors. 
849+       // Hopefully that kind of error is easy enough to avoid without help 
850+       // from the type-checker though. 
851+       params : $Shape < $NonMaybeType < $ElementType < ParamList ,  RouteName >>> , 
848852    )  = >  void , 
849853    ...
850854  } ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments