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 1
1
{
2
2
"name" : " react-native-update" ,
3
- "version" : " 10.25.4 " ,
3
+ "version" : " 10.26.0 " ,
4
4
"description" : " react-native hot update" ,
5
5
"main" : " src/index" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export const defaultContext = {
20
20
} ;
21
21
22
22
export const UpdateContext = createContext < {
23
- checkUpdate : ( ) => Promise < void > ;
23
+ checkUpdate : ( ) => Promise < void | CheckResult > ;
24
24
switchVersion : ( ) => Promise < void > ;
25
25
switchVersionLater : ( ) => Promise < void > ;
26
26
markSuccess : ( ) => void ;
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ export const UpdateProvider = ({
188
188
} else {
189
189
Linking . openURL ( downloadUrl ) ;
190
190
}
191
- return ;
191
+ return info ;
192
192
}
193
193
alertUpdate ( '提示' , '您的应用版本已更新,点击更新下载安装新版本' , [
194
194
{
@@ -209,7 +209,7 @@ export const UpdateProvider = ({
209
209
options . updateStrategy === 'silentAndLater'
210
210
) {
211
211
downloadUpdate ( info ) ;
212
- return ;
212
+ return info ;
213
213
}
214
214
alertUpdate (
215
215
'提示' ,
@@ -226,6 +226,7 @@ export const UpdateProvider = ({
226
226
] ,
227
227
) ;
228
228
}
229
+ return info ;
229
230
} ,
230
231
[
231
232
client ,
You can’t perform that action at this time.
0 commit comments