@@ -399,10 +399,20 @@ export const remoteData: Monad2<URI> &
399
399
bimap : < L , V , A , B > ( fla : RemoteData < L , A > , f : ( u : L ) => V , g : ( a : A ) => B ) : RemoteData < V , B > =>
400
400
pipe (
401
401
fla ,
402
- fold < L , A , RemoteData < V , B > > ( ( ) => initial , ( ) => pending , e => failure ( f ( e ) ) , a => success ( g ( a ) ) ) ,
402
+ fold < L , A , RemoteData < V , B > > (
403
+ ( ) => initial ,
404
+ foldO ( ( ) => pending , progress ) ,
405
+ e => failure ( f ( e ) ) ,
406
+ a => success ( g ( a ) ) ,
407
+ ) ,
403
408
) ,
404
409
mapLeft : < L , V , A > ( fla : RemoteData < L , A > , f : ( u : L ) => V ) : RemoteData < V , A > =>
405
- fold < L , A , RemoteData < V , A > > ( ( ) => initial , ( ) => pending , e => failure ( f ( e ) ) , ( ) => fla as any ) ( fla ) ,
410
+ fold < L , A , RemoteData < V , A > > (
411
+ ( ) => initial ,
412
+ foldO ( ( ) => pending , progress ) ,
413
+ e => failure ( f ( e ) ) ,
414
+ ( ) => fla as any ,
415
+ ) ( fla ) ,
406
416
407
417
//Alt
408
418
alt : < L , A > ( fx : RemoteData < L , A > , fy : ( ) => RemoteData < L , A > ) : RemoteData < L , A > => fold ( fy , fy , fy , ( ) => fx ) ( fx ) ,
@@ -414,7 +424,12 @@ export const remoteData: Monad2<URI> &
414
424
extend : < L , A , B > ( fla : RemoteData < L , A > , f : FunctionN < [ RemoteData < L , A > ] , B > ) : RemoteData < L , B > =>
415
425
pipe (
416
426
fla ,
417
- fold < L , A , RemoteData < L , B > > ( ( ) => initial , ( ) => pending , ( ) => fla as any , ( ) => success ( f ( fla ) ) ) ,
427
+ fold < L , A , RemoteData < L , B > > (
428
+ ( ) => initial ,
429
+ foldO ( ( ) => pending , progress ) ,
430
+ ( ) => fla as any ,
431
+ ( ) => success ( f ( fla ) ) ,
432
+ ) ,
418
433
) ,
419
434
} ;
420
435
0 commit comments