File tree Expand file tree Collapse file tree
reason-react-native/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ module DefaultSource = {
5050 external fromRequired: Packager.required => t = "%identity";
5151};
5252
53+ type imageErrorEvent = Event.syntheticEvent({. "error": string});
54+
5355type progress = {
5456 .
5557 "loaded": float,
@@ -59,6 +61,7 @@ type progress = {
5961[@react.component] [@bs.module "react-native"]
6062external make:
6163 (
64+ ~onError: imageErrorEvent => unit=?,
6265 ~onLayout: Event.layoutEvent => unit=?,
6366 ~onLoad: unit => unit=?,
6467 ~onLoadEnd: unit => unit=?,
@@ -86,14 +89,14 @@ external make:
8689 React.element =
8790 "Image";
8891
89- type error ;
92+ type sizeError ;
9093
9194[@bs.module "react-native"] [@bs.scope "Image"]
9295external getSize:
9396 (
9497 ~uri: string,
9598 ~success: (~width: float, ~height: float) => unit,
96- ~failure: error => unit=?,
99+ ~failure: sizeError => unit=?,
97100 unit
98101 ) =>
99102 unit =
@@ -118,7 +121,6 @@ type asset = {
118121};
119122
120123[@bs.module "react-native"] [@bs.scope "Image"]
121- external resolveAssetSource: Packager.required => asset =
122- "resolveAssetSource";
124+ external resolveAssetSource: Source.t => asset = "resolveAssetSource";
123125
124126```
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ module DefaultSource = {
4343 external fromRequired : Packager . required => t = "% identity " ;
4444};
4545
46+ type imageErrorEvent = Event . syntheticEvent ({. "error": string });
47+
4648type progress = {
4749 .
4850 "loaded": float ,
@@ -52,6 +54,7 @@ type progress = {
5254[@ react . component ] [@ bs . module "react-native" ]
5355external make :
5456 (
57+ ~onError : imageErrorEvent => unit =?,
5558 ~onLayout : Event . layoutEvent => unit =?,
5659 ~onLoad : unit => unit =?,
5760 ~onLoadEnd : unit => unit =?,
@@ -79,14 +82,14 @@ external make:
7982 React . element =
8083 "Image" ;
8184
82- type error ;
85+ type sizeError ;
8386
8487[@ bs . module "react-native" ] [@ bs . scope "Image" ]
8588external getSize :
8689 (
8790 ~uri : string ,
8891 ~success : (~width : float , ~height : float ) => unit ,
89- ~failure : error => unit =?,
92+ ~failure : sizeError => unit =?,
9093 unit
9194 ) =>
9295 unit =
You can’t perform that action at this time.
0 commit comments