File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 11{
22  "name" : " react-native-update" 
3-   "version" : " 10.25.4 " 
3+   "version" : " 10.26.0 " 
44  "description" : " react-native hot update" 
55  "main" : " src/index" 
66  "scripts" : {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export const defaultContext = {
2020} ; 
2121
2222export  const  UpdateContext  =  createContext < { 
23-   checkUpdate : ( )  =>  Promise < void > ; 
23+   checkUpdate : ( )  =>  Promise < void   |   CheckResult > ; 
2424  switchVersion : ( )  =>  Promise < void > ; 
2525  switchVersionLater : ( )  =>  Promise < void > ; 
2626  markSuccess : ( )  =>  void ; 
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ export const UpdateProvider = ({
188188            }  else  { 
189189              Linking . openURL ( downloadUrl ) ; 
190190            } 
191-             return ; 
191+             return   info ; 
192192          } 
193193          alertUpdate ( '提示' ,  '您的应用版本已更新,点击更新下载安装新版本' ,  [ 
194194            { 
@@ -209,7 +209,7 @@ export const UpdateProvider = ({
209209          options . updateStrategy  ===  'silentAndLater' 
210210        )  { 
211211          downloadUpdate ( info ) ; 
212-           return ; 
212+           return   info ; 
213213        } 
214214        alertUpdate ( 
215215          '提示' , 
@@ -226,6 +226,7 @@ export const UpdateProvider = ({
226226          ] , 
227227        ) ; 
228228      } 
229+       return  info ; 
229230    } , 
230231    [ 
231232      client , 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments